syzbot


KCSAN: data-race in data_push_tail / vsnprintf (4)

Status: auto-obsoleted due to no activity on 2023/05/03 19:58
Subsystems: ext4
[Documentation on labels]
First crash: 487d, last: 400d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / vsnprintf (6) ext4 23 67d 147d 0/26 auto-obsoleted due to no activity on 2024/03/31 12:46
upstream KCSAN: data-race in data_push_tail / vsnprintf (3) kernel 8 611d 710d 0/26 auto-closed as invalid on 2022/10/04 16:48
upstream KCSAN: data-race in data_push_tail / vsnprintf (2) ext4 1 767d 767d 0/26 auto-closed as invalid on 2022/05/01 03:50
upstream KCSAN: data-race in data_push_tail / vsnprintf (5) block net 2 310d 338d 0/26 closed as invalid on 2023/06/28 10:46
upstream KCSAN: data-race in data_push_tail / vsnprintf usb 36 831d 1145d 0/26 auto-closed as invalid on 2022/02/26 00:52

Sample crash report:
audit: type=1326 audit(1680119691.633:2221): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6474 comm="syz-executor.1" exe="/root/syz-executor.1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f763a3fb0f9 code=0x0
==================================================================
BUG: KCSAN: data-race in data_push_tail / vsnprintf

write to 0xffffffff86f21e93 of 1 bytes by task 6478 on cpu 1:
 vsnprintf+0xdd0/0xe20
 vscnprintf+0x42/0x80 lib/vsprintf.c:2902
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2137
 vprintk_store+0x567/0x800 kernel/printk/printk.c:2251
 vprintk_emit+0xd0/0x430 kernel/printk/printk.c:2297
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2327
 vprintk+0x83/0x90 kernel/printk/printk_safe.c:50
 _printk+0x7a/0xa0 kernel/printk/printk.c:2337
 __nla_validate_parse+0x15ba/0x1b50 lib/nlattr.c:615
 __nla_parse+0x40/0x50 lib/nlattr.c:700
 nla_parse_nested_deprecated include/net/netlink.h:1281 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3539 [inline]
 rtnl_newlink+0x412/0x15a0 net/core/rtnetlink.c:3670
 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6174
 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2574
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6192
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:724 [inline]
 sock_sendmsg net/socket.c:747 [inline]
 ____sys_sendmsg+0x375/0x4c0 net/socket.c:2501
 ___sys_sendmsg net/socket.c:2555 [inline]
 __sys_sendmsg+0x1e3/0x270 net/socket.c:2584
 __do_sys_sendmsg net/socket.c:2593 [inline]
 __se_sys_sendmsg net/socket.c:2591 [inline]
 __x64_sys_sendmsg+0x46/0x50 net/socket.c:2591
 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

read to 0xffffffff86f21e90 of 8 bytes by task 23 on cpu 0:
 data_make_reusable kernel/printk/printk_ringbuffer.c:590 [inline]
 data_push_tail+0x102/0x430 kernel/printk/printk_ringbuffer.c:675
 data_alloc+0xbe/0x2c0 kernel/printk/printk_ringbuffer.c:1046
 prb_reserve+0x893/0xbc0 kernel/printk/printk_ringbuffer.c:1555
 vprintk_store+0x536/0x800 kernel/printk/printk.c:2241
 vprintk_emit+0xd0/0x430 kernel/printk/printk.c:2297
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2327
 vprintk+0x83/0x90 kernel/printk/printk_safe.c:50
 _printk+0x7a/0xa0 kernel/printk/printk.c:2337
 kauditd_printk_skb kernel/audit.c:536 [inline]
 kauditd_hold_skb+0x19d/0x1b0 kernel/audit.c:571
 kauditd_send_queue+0x27a/0x2d0 kernel/audit.c:756
 kauditd_thread+0x42a/0x640 kernel/audit.c:880
 kthread+0x1ac/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

value changed: 0x00000000fffff557 -> 0x00000000000a2e27

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 23 Comm: kauditd Tainted: G        W          6.3.0-rc4-syzkaller-00039-gffe78bbd5121 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
==================================================================
audit: type=1326 audit(1680119691.943:2222): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6489 comm="syz-executor.1" exe="/root/syz-executor.1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f763a3fb0f9 code=0x0
audit: type=1326 audit(1680119692.059:2223): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6500 comm="syz-executor.1" exe="/root/syz-executor.1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f763a3fb0f9 code=0x0
audit: type=1326 audit(1680119692.748:2224): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6513 comm="syz-executor.1" exe="/root/syz-executor.1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f763a3fb0f9 code=0x0
audit: type=1400 audit(1680119695.630:2225): avc:  denied  { write } for  pid=2724 comm="syslogd" name="/" dev="tmpfs" ino=1 scontext=system_u:system_r:syslogd_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
audit: type=1400 audit(1680119695.630:2226): avc:  denied  { remove_name } for  pid=2724 comm="syslogd" name="messages" dev="tmpfs" ino=13 scontext=system_u:system_r:syslogd_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
audit: type=1400 audit(1680119695.630:2227): avc:  denied  { add_name } for  pid=2724 comm="syslogd" name="messages.0" dev="tmpfs" ino=12 scontext=system_u:system_r:syslogd_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
audit: type=1326 audit(1680119697.697:2228): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6613 comm="syz-executor.0" exe="/root/syz-executor.0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f4eb38a60f9 code=0x0
audit: type=1326 audit(1680119698.687:2229): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6651 comm="syz-executor.0" exe="/root/syz-executor.0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f4eb38a60f9 code=0x0
audit: type=1326 audit(1680119699.570:2230): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6672 comm="syz-executor.0" exe="/root/syz-executor.0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f4eb38a60f9 code=0x0
audit: type=1326 audit(1680119700.414:2231): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=root:sysadm_r:sysadm_t pid=6706 comm="syz-executor.0" exe="/root/syz-executor.0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f4eb38a60f9 code=0x0

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/29 19:55 upstream ffe78bbd5121 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/03/12 07:41 upstream 81ff855485a3 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/01/16 13:07 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/01/01 07:35 upstream c8451c141e07 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
* Struck through repros no longer work on HEAD.