syzbot


KCSAN: data-race in bcm_can_tx / bcm_tx_setup (3)

Status: upstream: reported on 2023/04/25 08:04
Labels: can (incorrect?)
Reported-by: syzbot+e1786f049e71693263bf@syzkaller.appspotmail.com
First crash: 95d, last: 17d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [can?] KCSAN: data-race in bcm_can_tx / bcm_tx_setup (3) 4 (5) 2023/05/11 17:56
[syzbot] Monthly can report (May 2023) 0 (1) 2023/05/10 13:56
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in bcm_can_tx / bcm_tx_setup (2) 8 205d 286d 0/24 auto-obsoleted due to no activity on 2022/12/14 13:23
upstream KCSAN: data-race in bcm_can_tx / bcm_tx_setup 4 327d 356d 0/24 auto-closed as invalid on 2022/08/14 14:16

Sample crash report:
==================================================================
BUG: KCSAN: data-race in bcm_can_tx / bcm_tx_setup

read to 0xffff888125ae8710 of 4 bytes by interrupt on cpu 1:
 bcm_can_tx+0x4e/0x410 net/can/bcm.c:276
 bcm_tx_timeout_handler+0xdb/0x260
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x217/0x700 kernel/time/hrtimer.c:1749
 hrtimer_run_softirq+0xd6/0x120 kernel/time/hrtimer.c:1766
 __do_softirq+0xc1/0x265 kernel/softirq.c:571
 run_ksoftirqd+0x17/0x20 kernel/softirq.c:939
 smpboot_thread_fn+0x30a/0x4a0 kernel/smpboot.c:164
 kthread+0x1d7/0x210 kernel/kthread.c:379
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

write to 0xffff888125ae8710 of 4 bytes by task 32320 on cpu 0:
 bcm_tx_setup+0x698/0xd30 net/can/bcm.c:995
 bcm_sendmsg+0x38b/0x470 net/can/bcm.c:1355
 sock_sendmsg_nosec net/socket.c:724 [inline]
 sock_sendmsg net/socket.c:747 [inline]
 ____sys_sendmsg+0x375/0x4c0 net/socket.c:2503
 ___sys_sendmsg net/socket.c:2557 [inline]
 __sys_sendmsg+0x1e3/0x270 net/socket.c:2586
 __do_sys_sendmsg net/socket.c:2595 [inline]
 __se_sys_sendmsg net/socket.c:2593 [inline]
 __x64_sys_sendmsg+0x46/0x50 net/socket.c:2593
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000009 -> 0x0000000b

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 32320 Comm: syz-executor.5 Not tainted 6.4.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2023/05/16 11:45 upstream f1fcbaa18b28 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
2023/05/02 20:20 upstream 865fdb08197e 52d40fd2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
2023/05/01 14:33 upstream 58390c8ce1bd 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
2023/04/25 04:36 upstream 1a0beef98b58 65320f8e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
2023/04/15 12:49 upstream 7a934f4bd7d6 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
2023/04/12 10:14 upstream e62252bc55b6 1a1596b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
2023/04/05 04:46 upstream 76f598ba7d8e 831373d3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
2023/02/26 21:25 upstream 2fcd07b7ccd5 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bcm_can_tx / bcm_tx_setup
* Struck through repros no longer work on HEAD.