From: Thomas Gleixner <tglx@linutronix.de>
To: John Stultz <john.stultz@linaro.org>
Cc: Shankara Pailoor <sp3485@columbia.edu>,
lkml <linux-kernel@vger.kernel.org>,
syzkaller <syzkaller@googlegroups.com>,
Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: UBSAN: Undefined error in time.h signed integer overflow
Date: Wed, 6 Sep 2017 10:07:27 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1709061006250.1843@nanos> (raw)
In-Reply-To: <CALAqxLWr9vakTzi3wgfwKbRjsZKdPqbO6w47Dka_us2EAGQBYw@mail.gmail.com>
On Tue, 5 Sep 2017, John Stultz wrote:
> On Tue, Sep 5, 2017 at 9:30 PM, Shankara Pailoor <sp3485@columbia.edu> wrote:
> > Hi,
> >
> > I encountered this bug while fuzzing linux kernel 4.13-rc7 with syzkaller.
> >
> > ================================================================================
> > UBSAN: Undefined behaviour in ./include/linux/time.h:233:27
> > signed integer overflow:
> > 8391720337152500783 * 1000000000 cannot be represented in type 'long int'
> > CPU: 0 PID: 31798 Comm: syz-executor2 Not tainted 4.13.0-rc7 #2
> > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
> > Ubuntu-1.8.2-1ubuntu1 04/01/2014
> > Call Trace:
> > __dump_stack lib/dump_stack.c:16 [inline]
> > dump_stack+0xf7/0x1ae lib/dump_stack.c:52
> > ubsan_epilogue+0x12/0x8f lib/ubsan.c:164
> > handle_overflow+0x21e/0x292 lib/ubsan.c:195
> > __ubsan_handle_mul_overflow+0x2a/0x3e lib/ubsan.c:219
> > timespec_to_ns include/linux/time.h:233 [inline]
> > posix_cpu_timer_set+0xb5c/0xf20 kernel/time/posix-cpu-timers.c:686
> > do_timer_settime+0x1f4/0x390 kernel/time/posix-timers.c:890
> > SYSC_timer_settime kernel/time/posix-timers.c:916 [inline]
> > SyS_timer_settime+0xea/0x170 kernel/time/posix-timers.c:902
> > entry_SYSCALL_64_fastpath+0x18/0xad
> > RIP: 0033:0x451e59
> > RSP: 002b:00007fb62af4fc08 EFLAGS: 00000216 ORIG_RAX: 00000000000000df
> > RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 0000000000451e59
> > RDX: 0000000020006000 RSI: 0000000000000000 RDI: 0000000000000000
> > RBP: 0000000000000046 R08: 0000000000000000 R09: 0000000000000000
> > R10: 0000000020003fe0 R11: 0000000000000216 R12: 00000000004be920
> > R13: 00000000ffffffff R14: ffffffffffffffff R15: 0000000000000000
> > ================================================================================
>
> Looks similar to the issue Thomas fixed here:
> https://patchwork.kernel.org/patch/9799827/
>
>
> Thomas: Should we change timespec_to_ns() to use the same transition
> internally rather then trying to track all the callers?
Probably.
Thanks,
tglx
next prev parent reply other threads:[~2017-09-06 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAASgV=vRCcjLxPfPq3T47wUU41arPDrZb=O1N7bktZh3ebcJpg@mail.gmail.com>
2017-09-06 4:55 ` John Stultz
2017-09-06 8:07 ` Thomas Gleixner [this message]
2017-09-06 4:32 Shankara Pailoor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1709061006250.1843@nanos \
--to=tglx@linutronix.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.org \
--cc=sp3485@columbia.edu \
--cc=syzkaller@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®