Hello,
syzbot found the following issue on:
HEAD commit: aacb77975041 Merge tag 'ovl-fixes-7.4-rc3' of git://
git.ke..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=11f96755580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=e9e70fa23cb8d70b
dashboard link:
https://syzkaller.appspot.com/bug?extid=708f1141bf273f4c09e6
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
CC: [
jst...@google.com linux-...@vger.kernel.org mlic...@redhat.com 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/af6ef4cfbe07/disk-aacb7797.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/b89973d431e2/vmlinux-aacb7797.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/f36d80bfd84a/bzImage-aacb7797.xz
AI-generated root cause summary:
In `ktime_get_coarse_ts64()`, plain reads of timekeeper fields
(`tk_xtime_coarse()` reading `tk->xtime_sec` and `tk->coarse_nsec`, and
`tk->wall_to_monotonic`) occur inside a sequence counter read section
(`read_seqcount_begin(&tk_core.seq)` ... `read_seqcount_retry(&tk_core.seq,
seq)`). Concurrently, timer interrupt processing on another CPU in
`timekeeping_update_from_shadow()` copies updated timekeeper data into
`tk_core.timekeeper` via `memcpy(&tkd->timekeeper, tk, sizeof(*tk))` inside a
`write_seqcount_begin()` ... `write_seqcount_end()` critical section. KCSAN
attempts to suppress reports for seqlock readers by marking the subsequent
memory accesses as atomic via `kcsan_atomic_next(KCSAN_SEQLOCK_REGION_MAX)`.
When the calling thread is preempted or executes nested code that clears or
exhausts `current->kcsan_ctx.atomic_next` before `tk->coarse_nsec` is read,
KCSAN observes an unannotated plain read racing with the concurrent `memcpy()`
and flags a data race.
full analysis:
https://syzkaller.appspot.com/x/ai_root_cause?x=708f1141bf273f4c09e6
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+708f11...@syzkaller.appspotmail.com
==================================================================
BUG: KCSAN: data-race in ktime_get_coarse_ts64 / timekeeping_update_from_shadow
write to 0xffffffff8963c948 of 320 bytes by interrupt on cpu 0:
timekeeping_update_from_shadow+0x46e/0x4b0 kernel/time/timekeeping.c:869
__timekeeping_advance+0xb36/0xcf0 kernel/time/timekeeping.c:2666
timekeeping_advance kernel/time/timekeeping.c:2674 [inline]
update_wall_time+0x21/0x50 kernel/time/timekeeping.c:2684
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:2079 [inline]
__hrtimer_run_queues+0x1f8/0x510 kernel/time/hrtimer.c:2136
hrtimer_interrupt+0x27b/0x860 kernel/time/hrtimer.c:2255
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
native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:63
arch_safe_halt arch/x86/kernel/process.c:767 [inline]
default_idle+0x9/0x20 arch/x86/kernel/process.c:768
default_idle_call+0x3b/0x60 kernel/sched/idle.c:122
cpuidle_idle_call kernel/sched/idle.c:199 [inline]
do_idle+0x183/0x2d0 kernel/sched/idle.c:355
cpu_startup_entry+0x24/0x30 kernel/sched/idle.c:458
rest_init+0x101/0x110 init/main.c:789
start_kernel+0x49f/0x4d0 init/main.c:1247
x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
x86_64_start_kernel+0xfc/0x100 arch/x86/kernel/head64.c:291
common_startup_64+0x13e/0x157
read to 0xffffffff8963c9b8 of 4 bytes by task 7067 on cpu 1:
tk_xtime_coarse kernel/time/timekeeping.c:218 [inline]
ktime_get_coarse_ts64+0x6d/0x120 kernel/time/timekeeping.c:2819
ktime_get_coarse include/linux/timekeeping.h:132 [inline]
ktime_get_coarse_ns include/linux/timekeeping.h:138 [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:1547 [inline]
__bpf_prog_run include/linux/filter.h:813 [inline]
bpf_prog_run include/linux/filter.h:820 [inline]
bpf_prog_run_pin_on_cpu include/linux/filter.h:837 [inline]
bpf_flow_dissect+0x157/0x360 net/core/flow_dissector.c:1024
bpf_prog_test_run_flow_dissector+0x25d/0x360 net/bpf/test_run.c:1565
bpf_prog_test_run+0x208/0x340 kernel/bpf/syscall.c:4860
__sys_bpf+0x914/0xc50 kernel/bpf/syscall.c:6478
__do_sys_bpf kernel/bpf/syscall.c:6582 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6579 [inline]
__x64_sys_bpf+0x69/0x80 kernel/bpf/syscall.c:6579
x64_sys_call+0xf26/0x2550 arch/x86/include/generated/asm/syscalls_64.h:322
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x116/0x380 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
value changed: 0x2687016f -> 0x271f97ef
Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 7067 Comm: syz.2.857 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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