KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow

Status: moderation: reported on 2026/05/10 01:50
Subsystems: kernel
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+f7dcf4d975188a9ddca4@syzkaller.appspotmail.com
First crash: 95d, last: 5d03h
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
eba7887a assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ✅ NetworkTrigger: ✅ PeripheralTrigger: ✅ RemoteTrigger: ✅ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ✅ VMHostTrigger: ✅ KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow 2026/05/15 19:26 2026/05/15 19:26 2026/05/15 19:28 efdaf0f9
9325fa29 assessment-kcsan Benign: ✅ KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow 2026/05/10 03:27 2026/05/10 03:27 2026/05/10 03:58 29233ece

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow

write to 0xffffffff893da4c8 of 304 bytes by interrupt on cpu 0:
 timekeeping_update_from_shadow+0x40d/0x440 kernel/time/timekeeping.c:835
 __timekeeping_advance+0xa68/0xc10 kernel/time/timekeeping.c:2614
 timekeeping_advance kernel/time/timekeeping.c:2622 [inline]
 update_wall_time+0x21/0x50 kernel/time/timekeeping.c:2632
 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+0x88/0x380 kernel/time/tick-sched.c:310
 __run_hrtimer kernel/time/hrtimer.c:2032 [inline]
 __hrtimer_run_queues+0x1f8/0x510 kernel/time/hrtimer.c:2096
 hrtimer_interrupt+0x257/0x810 kernel/time/hrtimer.c:2215
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1051 [inline]
 __sysvec_apic_timer_interrupt+0x5f/0x1c0 arch/x86/kernel/apic/apic.c:1068
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
 sysvec_apic_timer_interrupt+0x6f/0x80 arch/x86/kernel/apic/apic.c:1062
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
 __preempt_count_dec_and_test arch/x86/include/asm/preempt.h:95 [inline]
 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:188 [inline]
 _raw_spin_unlock_irq+0x12/0x30 kernel/locking/spinlock.c:206
 spin_unlock_irq include/linux/spinlock.h:402 [inline]
 filemap_remove_folio+0x75/0x1d0 mm/filemap.c:258
 truncate_inode_folio+0x42/0x50 mm/truncate.c:176
 shmem_undo_range+0x27f/0xb60 mm/shmem.c:1155
 shmem_truncate_range mm/shmem.c:1287 [inline]
 shmem_evict_inode+0x132/0x520 mm/shmem.c:1417
 evict+0x2a5/0x510 fs/inode.c:825
 iput_final fs/inode.c:2019 [inline]
 iput+0x430/0x5a0 fs/inode.c:2068
 dentry_unlink_inode+0x24a/0x260 fs/dcache.c:479
 dentry_kill+0x184/0x500 fs/dcache.c:826
 finish_dput+0x16/0x1d0 fs/dcache.c:1001
 dput+0x48/0x50 fs/dcache.c:1042
 __fput+0x43e/0x630 fs/file_table.c:520
 ____fput+0x1c/0x30 fs/file_table.c:540
 task_work_run+0x130/0x1a0 kernel/task_work.c:233
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0x4a4/0x1500 kernel/exit.c:1009
 do_group_exit+0xfe/0x140 kernel/exit.c:1152
 get_signal+0xe07/0xf10 kernel/signal.c:3046
 arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:101 [inline]
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:244 [inline]
 irqentry_exit_to_user_mode include/linux/irq-entry-common.h:315 [inline]
 irqentry_exit+0x14d/0x610 kernel/entry/common.c:165
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595

read to 0xffffffff893da4e8 of 8 bytes by task 16450 on cpu 1:
 timekeeping_cycles_to_ns kernel/time/timekeeping.c:450 [inline]
 timekeeping_get_ns kernel/time/timekeeping.c:455 [inline]
 ktime_get_with_offset+0x150/0x260 kernel/time/timekeeping.c:1017
 ktime_get_real include/linux/timekeeping.h:88 [inline]
 netif_rx_internal+0x1ec/0x210 net/core/dev.c:5706
 netif_rx+0x56/0x1c0 net/core/dev.c:5782
 dev_loopback_xmit+0x20e/0x2d0 net/core/dev.c:4350
 ip_mc_finish_output net/ipv4/ip_output.c:363 [inline]
 NF_HOOK+0x11f/0x230 include/linux/netfilter.h:318
 ip_mc_output+0x139/0x370 net/ipv4/ip_output.c:400
 dst_output include/net/dst.h:470 [inline]
 ip_local_out net/ipv4/ip_output.c:131 [inline]
 ip_send_skb+0x139/0x140 net/ipv4/ip_output.c:1506
 udp_send_skb+0x519/0x7a0 net/ipv4/udp.c:1161
 udp_sendmsg+0x1094/0x14e0 net/ipv4/udp.c:1443
 inet_sendmsg+0xac/0xd0 net/ipv4/af_inet.c:865
 sock_sendmsg_nosec net/socket.c:776 [inline]
 __sock_sendmsg net/socket.c:790 [inline]
 ____sys_sendmsg+0x4e8/0x580 net/socket.c:2684
 ___sys_sendmsg+0x195/0x1e0 net/socket.c:2738
 __sys_sendmmsg+0x185/0x320 net/socket.c:2827
 __do_sys_sendmmsg net/socket.c:2854 [inline]
 __se_sys_sendmmsg net/socket.c:2851 [inline]
 __x64_sys_sendmmsg+0x57/0x70 net/socket.c:2851
 x64_sys_call+0x27aa/0x3020 arch/x86/include/generated/asm/syscalls_64.h:308
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x136/0x3c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000f6f8f5f29ff12 -> 0x00100825df5962d8

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 16450 Comm: syz.3.30639 Tainted: G        W           syzkaller #0 PREEMPT(lazy) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/08 18:14 upstream a7c7074b58d2 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/07/30 14:39 upstream 11028ab62899 2377cd3d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/07/24 03:56 upstream d326f83e819c 544adce9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/07/20 10:07 upstream 82a47586c0b9 72524a66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/06/28 01:22 upstream 780d569e6c4b fb92f11c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/06/16 14:57 upstream b1cbabe84ca1 a3998659 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/06/05 21:27 upstream ddd664bbff63 48b6c3fa .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/05/16 23:11 upstream 6916d5703ddf de5aae85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/05/10 11:49 upstream 1bfaee9d3351 29233ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
2026/05/10 01:49 upstream e92b2872d0b1 29233ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ktime_get_with_offset / timekeeping_update_from_shadow
* Struck through repros no longer work on HEAD.