Re: [syzbot] [kernel?] KMSAN: uninit-value in timespec64_add_safe

0 views
Skip to first unread message

Thomas Gleixner

unread,
Mar 8, 2026, 5:32:36 AM (13 days ago) Mar 8
to syzbot, jst...@google.com, linux-...@vger.kernel.org, sb...@kernel.org, syzkall...@googlegroups.com, Alexander Potapenko, Marco Elver, kasa...@googlegroups.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 all
Reply to author
Forward
0 new messages