syzbot


KCSAN: data-race in data_push_tail / ip6_addr_string

Status: auto-obsoleted due to no activity on 2023/12/29 08:39
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+28e00a6bab865c9c7d46@syzkaller.appspotmail.com
First crash: 204d, last: 204d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [net?] KCSAN: data-race in data_push_tail / ip6_addr_string 0 (1) 2023/12/05 16:21

Sample crash report:
ext4 filesystem being mounted at /root/syzkaller-testdir4291713644/syzkaller.zakLwE/4472/file1 supports timestamps until 2038-01-19 (0x7fffffff)
==================================================================
BUG: KCSAN: data-race in data_push_tail / ip6_addr_string

write to 0xffffffff86eb5840 of 1 bytes by task 5346 on cpu 0:
 string_nocheck lib/vsprintf.c:650 [inline]
 ip6_addr_string+0x119/0x1a0 lib/vsprintf.c:1469
 ip_addr_string+0x15f/0x5d0 lib/vsprintf.c:1591
 pointer+0x647/0xd10 lib/vsprintf.c:2444
 vsnprintf+0x861/0xe20 lib/vsprintf.c:2823
 vscnprintf+0x42/0x80 lib/vsprintf.c:2925
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2124
 vprintk_store+0x56f/0x800 kernel/printk/printk.c:2238
 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2318
 vprintk+0x71/0x80 kernel/printk/printk_safe.c:45
 _printk+0x7a/0xa0 kernel/printk/printk.c:2328
 __ip6_tnl_rcv+0x7ee/0x800 net/ipv6/ip6_tunnel.c:848
 ip6_tnl_rcv+0x64/0x80 net/ipv6/ip6_tunnel.c:888
 gre_rcv+0x7b5/0x850
 ip6_protocol_deliver_rcu+0x92f/0xf30 net/ipv6/ip6_input.c:438
 ip6_input_finish net/ipv6/ip6_input.c:483 [inline]
 NF_HOOK include/linux/netfilter.h:314 [inline]
 ip6_input+0xbd/0x1b0 net/ipv6/ip6_input.c:492
 ip6_mc_input+0x34a/0x480 net/ipv6/ip6_input.c:586
 dst_input include/net/dst.h:461 [inline]
 ip6_rcv_finish+0x1e2/0x2e0 net/ipv6/ip6_input.c:79
 NF_HOOK include/linux/netfilter.h:314 [inline]
 ipv6_rcv+0x74/0x150 net/ipv6/ip6_input.c:310
 __netif_receive_skb_one_core net/core/dev.c:5529 [inline]
 __netif_receive_skb+0x90/0x1b0 net/core/dev.c:5643
 netif_receive_skb_internal net/core/dev.c:5729 [inline]
 netif_receive_skb+0x4a/0x310 net/core/dev.c:5788
 tun_rx_batched+0xf0/0x410 drivers/net/tun.c:1555
 tun_get_user+0x1d3f/0x2340 drivers/net/tun.c:2002
 tun_chr_write_iter+0x18e/0x240 drivers/net/tun.c:2048
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x48a/0x790 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffffffff86eb5840 of 8 bytes by task 5334 on cpu 1:
 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+0x53e/0x800 kernel/printk/printk.c:2228
 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2318
 vprintk+0x71/0x80 kernel/printk/printk_safe.c:45
 _printk+0x7a/0xa0 kernel/printk/printk.c:2328
 mnt_warn_timestamp_expiry+0x1bb/0x1f0 fs/namespace.c:2804
 do_new_mount_fc fs/namespace.c:3278 [inline]
 do_new_mount+0x2ee/0x660 fs/namespace.c:3339
 path_mount+0x496/0xb30 fs/namespace.c:3664
 do_mount fs/namespace.c:3677 [inline]
 __do_sys_mount fs/namespace.c:3886 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:3863
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3863
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000010000bfe1 -> 0x303a303030303a30

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5334 Comm: syz-executor.1 Tainted: G        W          6.7.0-rc2-syzkaller-00095-gd3fa86b1a7b4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/24 08:38 upstream d3fa86b1a7b4 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / ip6_addr_string
* Struck through repros no longer work on HEAD.