syzbot


KCSAN: data-race in hrtimer_interrupt / print_tickdevice (14)

Status: moderation: reported on 2024/10/04 01:50
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+d4c53363703843fd81af@syzkaller.appspotmail.com
First crash: 48d, last: 9d23h
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (6) kernel 5 851d 875d 0/28 auto-closed as invalid on 2022/08/27 09:49
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (13) kernel 2 98d 104d 0/28 auto-obsoleted due to no activity on 2024/09/19 01:50
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (8) kernel 3 723d 746d 0/28 auto-obsoleted due to no activity on 2023/01/03 04:47
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (4) kernel 14 987d 1152d 0/28 auto-closed as invalid on 2022/04/13 14:16
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (2) kernel 3 1288d 1292d 0/28 auto-closed as invalid on 2021/06/16 18:46
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (10) kernel 1 448d 448d 0/28 auto-obsoleted due to no activity on 2023/10/04 07:33
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (5) kernel 2 925d 925d 0/28 auto-closed as invalid on 2022/06/15 02:31
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (7) kernel 1 795d 795d 0/28 auto-obsoleted due to no activity on 2022/10/22 07:07
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (11) kernel 2 333d 346d 0/28 auto-obsoleted due to no activity on 2024/01/28 02:00
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (3) kernel 2 1202d 1237d 0/28 auto-closed as invalid on 2021/09/10 15:52
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice kernel 1 1404d 1404d 0/28 auto-closed as invalid on 2021/02/20 21:54
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (12) kernel 1 203d 203d 0/28 auto-obsoleted due to no activity on 2024/06/05 19:29
upstream KCSAN: data-race in hrtimer_interrupt / print_tickdevice (9) kernel 20 515d 664d 0/28 auto-obsoleted due to no activity on 2023/07/30 02:27

Sample crash report:
==================================================================
BUG: KCSAN: data-race in hrtimer_interrupt / print_tickdevice

write to 0xffff888237c1c218 of 8 bytes by interrupt on cpu 0:
 hrtimer_interrupt+0x80/0x7b0 kernel/time/hrtimer.c:1796
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline]
 __sysvec_apic_timer_interrupt+0x5c/0x1d0 arch/x86/kernel/apic/apic.c:1055
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
 sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1049
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
 kcsan_setup_watchpoint+0x404/0x410 kernel/kcsan/core.c:705
 montgomery_ladder arch/x86/crypto/curve25519-x86_64.c:1095 [inline]
 curve25519_ever64 arch/x86/crypto/curve25519-x86_64.c:1252 [inline]
 curve25519_arch+0x184a/0x4ff0 arch/x86/crypto/curve25519-x86_64.c:1599
 curve25519 include/crypto/curve25519.h:39 [inline]
 mix_dh+0x5e/0x1c0 drivers/net/wireguard/noise.c:411
 wg_noise_handshake_consume_initiation+0x22c/0x740 drivers/net/wireguard/noise.c:608
 wg_receive_handshake_packet drivers/net/wireguard/receive.c:144 [inline]
 wg_packet_handshake_receive_worker+0x3c9/0x5f0 drivers/net/wireguard/receive.c:213
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888237c1c218 of 8 bytes by task 3487 on cpu 1:
 print_tickdevice+0x144/0x340 kernel/time/timer_list.c:208
 timer_list_show+0x79/0x180 kernel/time/timer_list.c:300
 seq_read_iter+0x655/0x930 fs/seq_file.c:272
 proc_reg_read_iter+0x118/0x190 fs/proc/inode.c:299
 copy_splice_read+0x3a0/0x5d0 fs/splice.c:365
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x269/0x670 fs/splice.c:1089
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x39b/0x970 fs/read_write.c:1388
 __do_sys_sendfile64 fs/read_write.c:1455 [inline]
 __se_sys_sendfile64 fs/read_write.c:1441 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1441
 x64_sys_call+0xed5/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000000068230e963 -> 0x000000068269bfb5

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3487 Comm: syz.1.15 Not tainted 6.12.0-rc6-syzkaller-00318-ga9cda7c0ffed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/11 07:04 upstream a9cda7c0ffed 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in hrtimer_interrupt / print_tickdevice
2024/10/13 06:01 upstream 7234e2ea0edd 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in hrtimer_interrupt / print_tickdevice
2024/10/04 20:21 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in hrtimer_interrupt / print_tickdevice
2024/10/04 01:49 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in hrtimer_interrupt / print_tickdevice
* Struck through repros no longer work on HEAD.