syzbot


KCSAN: data-race in data_push_tail / mac_address_string (2)

Status: auto-obsoleted due to no activity on 2024/12/17 03:19
Subsystems: batman
[Documentation on labels]
First crash: 90d, last: 90d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / mac_address_string batman 2 256d 273d 0/28 auto-obsoleted due to no activity on 2024/06/13 22:15

Sample crash report:
audit: type=1326 audit(1729567031.812:1584): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6935 comm="syz.4.490" exe="/root/syz-executor" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f4b1fd7dff9 code=0x7ffc0000
audit: type=1326 audit(1729567031.852:1585): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6935 comm="syz.4.490" exe="/root/syz-executor" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f4b1fd7dff9 code=0x7ffc0000
==================================================================
BUG: KCSAN: data-race in data_push_tail / mac_address_string

write to 0xffffffff88ba371b of 1 bytes by task 6647 on cpu 1:
 string_nocheck lib/vsprintf.c:650 [inline]
 mac_address_string+0x55d/0x5e0 lib/vsprintf.c:1306
 pointer+0x75a/0xd20 lib/vsprintf.c:2418
 vsnprintf+0x861/0xe30 lib/vsprintf.c:2807
 vscnprintf+0x42/0x90 lib/vsprintf.c:2909
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2197
 vprintk_store+0x570/0x810 kernel/printk/printk.c:2311
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2383
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2422
 vprintk+0x75/0x80 kernel/printk/printk_safe.c:68
 _printk+0x7a/0xa0 kernel/printk/printk.c:2432
 batadv_check_known_mac_addr+0x147/0x180 net/batman-adv/hard-interface.c:526
 batadv_hard_if_event+0x4b0/0x1010 net/batman-adv/hard-interface.c:998
 notifier_call_chain kernel/notifier.c:93 [inline]
 raw_notifier_call_chain+0x6f/0x1d0 kernel/notifier.c:461
 call_netdevice_notifiers_info+0xae/0x100 net/core/dev.c:1996
 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline]
 call_netdevice_notifiers net/core/dev.c:2048 [inline]
 dev_set_mac_address+0x1ff/0x260 net/core/dev.c:9104
 dev_set_mac_address_user+0x31/0x50 net/core/dev.c:9118
 do_setlink+0x513/0x2490 net/core/rtnetlink.c:2884
 __rtnl_newlink net/core/rtnetlink.c:3725 [inline]
 rtnl_newlink+0x11a3/0x1690 net/core/rtnetlink.c:3772
 rtnetlink_rcv_msg+0x6aa/0x710 net/core/rtnetlink.c:6675
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2551
 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6693
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0x599/0x670 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:729 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:744
 __sys_sendto+0x1d6/0x260 net/socket.c:2214
 __do_sys_sendto net/socket.c:2226 [inline]
 __se_sys_sendto net/socket.c:2222 [inline]
 __x64_sys_sendto+0x78/0x90 net/socket.c:2222
 x64_sys_call+0x2959/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:45
 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

read to 0xffffffff88ba3718 of 8 bytes by task 29 on cpu 0:
 data_make_reusable kernel/printk/printk_ringbuffer.c:594 [inline]
 data_push_tail+0x102/0x430 kernel/printk/printk_ringbuffer.c:679
 data_alloc+0xbe/0x2c0 kernel/printk/printk_ringbuffer.c:1054
 prb_reserve+0x85e/0xb60 kernel/printk/printk_ringbuffer.c:1669
 vprintk_store+0x53f/0x810 kernel/printk/printk.c:2301
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2383
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2422
 vprintk+0x75/0x80 kernel/printk/printk_safe.c:68
 _printk+0x7a/0xa0 kernel/printk/printk.c:2432
 kauditd_printk_skb kernel/audit.c:546 [inline]
 kauditd_hold_skb+0x1a3/0x1b0 kernel/audit.c:581
 kauditd_send_queue+0x288/0x2e0 kernel/audit.c:766
 kauditd_thread+0x42a/0x650 kernel/audit.c:890
 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

value changed: 0x00000000ffffe629 -> 0x613a61613a616128

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 29 Comm: kauditd Not tainted 6.12.0-rc4-syzkaller-00045-gd12937763990 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
audit: type=1326 audit(1729567031.902:1586): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6935 comm="syz.4.490" exe="/root/syz-executor" sig=0 arch=c000003e syscall=306 compat=0 ip=0x7f4b1fd7dff9 code=0x7ffc0000
audit: type=1326 audit(1729567031.902:1587): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6935 comm="syz.4.490" exe="/root/syz-executor" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f4b1fd7dff9 code=0x7ffc0000
audit: type=1326 audit(1729567031.902:1588): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6935 comm="syz.4.490" exe="/root/syz-executor" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f4b1fd7dff9 code=0x7ffc0000
audit: type=1326 audit(1729567031.952:1589): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6935 comm="syz.4.490" exe="/root/syz-executor" sig=0 arch=c000003e syscall=220 compat=0 ip=0x7f4b1fd7dff9 code=0x7ffc0000
audit: type=1326 audit(1729567031.952:1590): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6935 comm="syz.4.490" exe="/root/syz-executor" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f4b1fd7dff9 code=0x7ffc0000

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/22 03:17 upstream d12937763990 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / mac_address_string
* Struck through repros no longer work on HEAD.