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

1 view
Skip to first unread message

syzbot

unread,
6:24 PM (3 hours ago) 6:24 PM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4ee64205ffaa Merge tag 'clk-for-linus' of git://git.kernel..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1694acce580000
kernel config: https://syzkaller.appspot.com/x/.config?x=ff1bc04bab908995
dashboard link: https://syzkaller.appspot.com/bug?extid=0a41b18f180884377958
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/e2ff5e3f4a08/disk-4ee64205.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/65d8a395837c/vmlinux-4ee64205.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a5fd2c472bcd/bzImage-4ee64205.xz

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

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

write to 0xffffffff895d8488 of 304 bytes by interrupt on cpu 1:
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
native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:62
arch_safe_halt arch/x86/kernel/process.c:766 [inline]
default_idle+0x9/0x20 arch/x86/kernel/process.c:767
default_idle_call+0x3b/0x60 kernel/sched/idle.c:122
cpuidle_idle_call kernel/sched/idle.c:199 [inline]
do_idle+0x17f/0x2b0 kernel/sched/idle.c:352
cpu_startup_entry+0x24/0x30 kernel/sched/idle.c:451
start_secondary+0x95/0xa0 arch/x86/kernel/smpboot.c:312
common_startup_64+0x13e/0x147

read to 0xffffffff895d84f8 of 4 bytes by task 4851 on cpu 0:
tk_xtime_coarse kernel/time/timekeeping.c:212 [inline]
ktime_get_coarse_ts64+0x6d/0x120 kernel/time/timekeeping.c:2685
ktime_get_coarse include/linux/timekeeping.h:133 [inline]
ktime_get_coarse_ns include/linux/timekeeping.h:139 [inline]
____bpf_ktime_get_coarse_ns kernel/bpf/helpers.c:204 [inline]
bpf_ktime_get_coarse_ns+0x39/0xb0 kernel/bpf/helpers.c:202
bpf_prog_ce3dfd7f9330a559+0x1e/0x29
bpf_dispatcher_nop_func include/linux/bpf.h:1402 [inline]
__bpf_prog_run include/linux/filter.h:722 [inline]
bpf_prog_run include/linux/filter.h:729 [inline]
bpf_prog_run_pin_on_cpu include/linux/filter.h:746 [inline]
bpf_flow_dissect+0x158/0x350 net/core/flow_dissector.c:1024
bpf_prog_test_run_flow_dissector+0x25d/0x360 net/bpf/test_run.c:1525
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: 0x1972605a -> 0x1a0c2809

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4851 Comm: syz.6.270 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/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