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

2 views
Skip to first unread message

syzbot

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

syzbot found the following issue on:

HEAD commit: 1d51b370a0f8 Merge tag 'jfs-7.1' of github.com:kleikamp/li..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=175a58ce580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7f207c4b1fbf85a3
dashboard link: https://syzkaller.appspot.com/bug?extid=c4eee77e16e1eb0f4901
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/e08ff8d2b0e5/disk-1d51b370.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c11d4b098bbf/vmlinux-1d51b370.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6a4691f32e3d/bzImage-1d51b370.xz

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

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

write to 0xffffffff893ce5c8 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
kcsan_setup_watchpoint+0x404/0x410 kernel/kcsan/core.c:705
folio_batch_add include/linux/folio_batch.h:77 [inline]
free_pages_and_swap_cache+0x281/0x3a0 mm/swap_state.c:400
__tlb_batch_free_encoded_pages mm/mmu_gather.c:138 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:151 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:417 [inline]
tlb_flush_mmu+0x557/0x6d0 mm/mmu_gather.c:424
zap_pte_range mm/memory.c:1957 [inline]
zap_pmd_range mm/memory.c:2004 [inline]
zap_pud_range mm/memory.c:2032 [inline]
zap_p4d_range mm/memory.c:2053 [inline]
__zap_vma_range+0x24a6/0x2c10 mm/memory.c:2093
unmap_vmas+0x22a/0x340 mm/memory.c:2162
exit_mmap+0x1ab/0x5f0 mm/mmap.c:1300
__mmput+0x28/0x1c0 kernel/fork.c:1177
mmput+0x40/0x50 kernel/fork.c:1200
exit_mm+0x113/0x1a0 kernel/exit.c:581
do_exit+0x442/0x1530 kernel/exit.c:965
do_group_exit+0x138/0x140 kernel/exit.c:1119
__do_sys_exit_group kernel/exit.c:1130 [inline]
__se_sys_exit_group kernel/exit.c:1128 [inline]
__x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1128
x64_sys_call+0x3008/0x3020 arch/x86/include/generated/asm/syscalls_64.h:232
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 0xffffffff893ce5d8 of 8 bytes by task 3300 on cpu 1:
timekeeping_cycles_to_ns kernel/time/timekeeping.c:426 [inline]
timekeeping_get_ns kernel/time/timekeeping.c:449 [inline]
ktime_get_real_ts64_mg+0xfa/0x3b0 kernel/time/timekeeping.c:2648
inode_set_ctime_current+0x2d6/0x8c0 fs/inode.c:2850
shmem_mknod+0x127/0x170 mm/shmem.c:3898
shmem_create+0x34/0x50 mm/shmem.c:3953
lookup_open fs/namei.c:4511 [inline]
open_last_lookups fs/namei.c:4611 [inline]
path_openat+0xd75/0x2050 fs/namei.c:4855
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

value changed: 0x000000641f30699f -> 0x0000006420801b0c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3300 Comm: udevd Tainted: G W syzkaller #0 PREEMPT(full)
Tainted: [W]=WARN
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