public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: syzbot <syzbot+5fca9514ef36ad94d973@syzkaller.appspotmail.com>,
	jstultz@google.com, linux-kernel@vger.kernel.org,
	sboyd@kernel.org, syzkaller-bugs@googlegroups.com
Cc: Alexander Potapenko <glider@google.com>,
	Marco Elver <elver@google.com>,
	kasan-dev@googlegroups.com
Subject: Re: [syzbot] [kernel?] KMSAN: uninit-value in timespec64_add_safe
Date: Sun, 08 Mar 2026 10:32:30 +0100	[thread overview]
Message-ID: <874imq3bv5.ffs@tglx> (raw)
In-Reply-To: <69aa4169.050a0220.13f275.0007.GAE@google.com>

On Thu, Mar 05 2026 at 18:52, syzbot wrote:
> udevd[5131]: starting eudev-3.2.14
> =====================================================
> BUG: KMSAN: uninit-value in set_normalized_timespec64 kernel/time/time.c:492 [inline]
> BUG: KMSAN: uninit-value in timespec64_add_safe+0x4b4/0x520 kernel/time/time.c:846
>  set_normalized_timespec64 kernel/time/time.c:492 [inline]
>  timespec64_add_safe+0x4b4/0x520 kernel/time/time.c:846
>  ep_timeout_to_timespec fs/eventpoll.c:1872 [inline]
>  __do_sys_epoll_wait fs/eventpoll.c:2471 [inline]
>  __se_sys_epoll_wait fs/eventpoll.c:2465 [inline]
>  __x64_sys_epoll_wait+0x1fa/0x3a0 fs/eventpoll.c:2465
>  x64_sys_call+0x2ece/0x3ea0 arch/x86/include/generated/asm/syscalls_64.h:233
>  do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
>  do_syscall_64+0x134/0xf80 arch/x86/entry/syscall_64.c:94
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Local variable now.i.i.i created at:
>  ep_timeout_to_timespec fs/eventpoll.c:1857 [inline]
>  __do_sys_epoll_wait fs/eventpoll.c:2471 [inline]
>  __se_sys_epoll_wait fs/eventpoll.c:2465 [inline]
>  __x64_sys_epoll_wait+0xcf/0x3a0 fs/eventpoll.c:2465
>  x64_sys_call+0x2ece/0x3ea0 arch/x86/include/generated/asm/syscalls_64.h:233

This lacks:

Local variable now.i.i.i initialized at:

        ktime_get_ts64(&now);                   <---- HERE

Right before the timespec64_add_safe() invocation
        
        *to = timespec64_add_safe(now, *to);

KMSAN confused itself....

Thanks,

        tglx

      reply	other threads:[~2026-03-08  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06  2:52 [syzbot] [kernel?] KMSAN: uninit-value in timespec64_add_safe syzbot
2026-03-08  9:32 ` Thomas Gleixner [this message]

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=874imq3bv5.ffs@tglx \
    --to=tglx@kernel.org \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=jstultz@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=syzbot+5fca9514ef36ad94d973@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@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