[moderation] [kernel?] KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow

0 views
Skip to first unread message

syzbot

unread,
May 9, 2026, 9:50:29 PM (2 days ago) May 9
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e92b2872d0b1 Merge tag 'rust-fixes-7.1' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=131b43ce580000
kernel config: https://syzkaller.appspot.com/x/.config?x=2e40c0f41e01837e
dashboard link: https://syzkaller.appspot.com/bug?extid=f7dcf4d975188a9ddca4
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
CC: [jst...@google.com linux-...@vger.kernel.org sb...@kernel.org tg...@kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/dccc5f5f0aa0/disk-e92b2872.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/806f97c3379b/vmlinux-e92b2872.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b449b06ca9a5/bzImage-e92b2872.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f7dcf4...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow

write to 0xffffffff893a7488 of 304 bytes by interrupt on cpu 0:
timekeeping_update_from_shadow+0x40d/0x440 kernel/time/timekeeping.c:829
__timekeeping_advance+0xa5d/0xc10 kernel/time/timekeeping.c:2532
timekeeping_advance kernel/time/timekeeping.c:2540 [inline]
update_wall_time+0x21/0x50 kernel/time/timekeeping.c:2550
tick_do_update_jiffies64+0x169/0x1c0 kernel/time/tick-sched.c:149
tick_sched_do_timer kernel/time/tick-sched.c:253 [inline]
tick_nohz_handler+0x8d/0x3d0 kernel/time/tick-sched.c:312
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x276/0x4f0 kernel/time/hrtimer.c:1994
hrtimer_interrupt+0x261/0x850 kernel/time/hrtimer.c:2113
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
__sysvec_apic_timer_interrupt+0x5f/0x1c0 arch/x86/kernel/apic/apic.c:1067
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0x6f/0x80 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
check_access kernel/kcsan/core.c:747 [inline]
__tsan_read8+0xb7/0x190 kernel/kcsan/core.c:1025
avtab_search_node+0x241/0x2b0 security/selinux/ss/avtab.c:155
context_struct_compute_av+0x343/0xaf0 security/selinux/ss/services.c:664
security_compute_av+0x34f/0xa20 security/selinux/ss/services.c:1177
avc_compute_av+0x5d/0x430 security/selinux/avc.c:992
avc_perm_nonode+0x5e/0xe0 security/selinux/avc.c:1117
avc_has_perm_noaudit+0xf2/0x130 security/selinux/avc.c:1160
cred_has_capability+0x121/0x2a0 security/selinux/hooks.c:1666
selinux_capable+0x31/0x40 security/selinux/hooks.c:2189
security_capable+0x7b/0x90 security/security.c:660
ns_capable_common kernel/capability.c:342 [inline]
ns_capable kernel/capability.c:363 [inline]
capable_wrt_inode_uidgid+0x6f/0x190 kernel/capability.c:478
generic_permission+0x2c8/0x470 fs/namei.c:554
do_inode_permission fs/namei.c:585 [inline]
inode_permission+0x17a/0x3b0 fs/namei.c:648
may_open+0x255/0x350 fs/namei.c:4276
do_open fs/namei.c:4697 [inline]
path_openat+0x1a59/0x2050 fs/namei.c:4858
do_file_open+0x16c/0x290 fs/namei.c:4887
do_sys_openat2+0x94/0x130 fs/open.c:1364
do_sys_open fs/open.c:1370 [inline]
__do_sys_openat fs/open.c:1386 [inline]
__se_sys_openat fs/open.c:1381 [inline]
__x64_sys_openat+0xf2/0x120 fs/open.c:1381
x64_sys_call+0x1e39/0x3020 arch/x86/include/generated/asm/syscalls_64.h:258
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x12c/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff893a7498 of 8 bytes by task 29328 on cpu 1:
timekeeping_cycles_to_ns kernel/time/timekeeping.c:426 [inline]
timekeeping_get_ns kernel/time/timekeeping.c:449 [inline]
ktime_get_with_offset+0xed/0x260 kernel/time/timekeeping.c:1011
ktime_get_real include/linux/timekeeping.h:88 [inline]
netif_receive_skb_list_internal+0x1b4/0x5f0 net/core/dev.c:6412
netif_receive_skb_list+0x33/0x1c0 net/core/dev.c:6487
xdp_recv_frames net/bpf/test_run.c:269 [inline]
xdp_test_run_batch net/bpf/test_run.c:350 [inline]
bpf_test_run_xdp_live+0x104c/0x1360 net/bpf/test_run.c:379
bpf_prog_test_run_xdp+0x57b/0xa10 net/bpf/test_run.c:1430
bpf_prog_test_run+0x204/0x340 kernel/bpf/syscall.c:4742
__sys_bpf+0x52e/0x7e0 kernel/bpf/syscall.c:6266
__do_sys_bpf kernel/bpf/syscall.c:6361 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6359 [inline]
__x64_sys_bpf+0x41/0x50 kernel/bpf/syscall.c:6359
x64_sys_call+0x10cb/0x3020 arch/x86/include/generated/asm/syscalls_64.h:322
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x12c/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000001b7f53175c0 -> 0x000001b7f6812e6f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 29328 Comm: syz.7.7848 Tainted: G W syzkaller #0 PREEMPT(full)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages