syzbot


KCSAN: data-race in data_push_tail / string

Status: moderation: reported on 2021/07/22 19:23
Subsystems: audit
[Documentation on labels]
Reported-by: syzbot+b3b8d0f2cecce376adeb@syzkaller.appspotmail.com
First crash: 1159d, last: 2d21h

Sample crash report:
EXT4-fs warning (device loop4): ext4_end_bio:347: I/O error 10 writing to inode 15 starting block 39)
Buffer I/O error on device loop4, logical block 39
Buffer I/O error on device loop4, logical block 40
syz-executor.4: attempt to access beyond end of device
loop4: rw=2049, sector=506, nr_sectors = 4 limit=64
==================================================================
BUG: KCSAN: data-race in data_push_tail / string

write to 0xffffffff883c7006 of 1 bytes by task 6533 on cpu 0:
 string_nocheck lib/vsprintf.c:650 [inline]
 string+0x16c/0x210 lib/vsprintf.c:728
 vsnprintf+0xa09/0xe30 lib/vsprintf.c:2824
 vscnprintf+0x42/0x90 lib/vsprintf.c:2930
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2165
 vprintk_store+0x570/0x810 kernel/printk/printk.c:2279
 vprintk_emit+0x10c/0x5e0 kernel/printk/printk.c:2329
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2363
 vprintk+0x75/0x80 kernel/printk/printk_safe.c:45
 _printk+0x7a/0xa0 kernel/printk/printk.c:2373
 start_creating+0x207/0x230
 debugfs_create_dir+0x21/0x290 fs/debugfs/inode.c:585
 hsr_debugfs_init+0x36/0xe0 net/hsr/hsr_debugfs.c:81
 hsr_dev_finalize+0x4ab/0x4e0 net/hsr/hsr_device.c:604
 hsr_newlink+0x426/0x470 net/hsr/hsr_netlink.c:102
 rtnl_newlink_create net/core/rtnetlink.c:3494 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3714 [inline]
 rtnl_newlink+0xefd/0x1690 net/core/rtnetlink.c:3727
 rtnetlink_rcv_msg+0x82e/0x8e0 net/core/rtnetlink.c:6595
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2559
 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6613
 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
 netlink_unicast+0x58d/0x660 net/netlink/af_netlink.c:1361
 netlink_sendmsg+0x5d3/0x6e0 net/netlink/af_netlink.c:1905
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:745
 __sys_sendto+0x1e5/0x260 net/socket.c:2191
 __do_sys_sendto net/socket.c:2203 [inline]
 __se_sys_sendto net/socket.c:2199 [inline]
 __x64_sys_sendto+0x78/0x90 net/socket.c:2199
 x64_sys_call+0x16bb/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:45
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff883c7000 of 8 bytes by task 6603 on cpu 1:
 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:2269
 vprintk_emit+0x10c/0x5e0 kernel/printk/printk.c:2329
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2363
 vprintk+0x75/0x80 kernel/printk/printk_safe.c:45
 _printk+0x7a/0xa0 kernel/printk/printk.c:2373
 bio_check_eod block/blk-core.c:553 [inline]
 submit_bio_noacct+0x745/0x830 block/blk-core.c:767
 submit_bio+0x218/0x230 block/blk-core.c:886
 ext4_io_submit fs/ext4/page-io.c:378 [inline]
 io_submit_add_bh fs/ext4/page-io.c:419 [inline]
 ext4_bio_write_folio+0x6c0/0x9a0 fs/ext4/page-io.c:563
 mpage_submit_folio fs/ext4/inode.c:1869 [inline]
 mpage_process_page_bufs+0x488/0x5d0 fs/ext4/inode.c:1982
 mpage_prepare_extent_to_map+0x788/0xb80 fs/ext4/inode.c:2490
 ext4_do_writepages+0x6ea/0x2110 fs/ext4/inode.c:2632
 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2768
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2613
 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:397
 __filemap_fdatawrite_range mm/filemap.c:430 [inline]
 file_write_and_wait_range+0xc8/0x170 mm/filemap.c:788
 generic_buffers_fsync_noflush+0x4c/0x130 fs/buffer.c:602
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x20b/0x6c0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2811 [inline]
 ext4_buffered_write_iter+0x338/0x380 fs/ext4/file.c:305
 ext4_file_write_iter+0x29f/0xe30
 do_iter_readv_writev+0x339/0x3e0
 vfs_writev+0x2e9/0x860 fs/read_write.c:971
 do_pwritev fs/read_write.c:1072 [inline]
 __do_sys_pwritev2 fs/read_write.c:1131 [inline]
 __se_sys_pwritev2+0x10c/0x1d0 fs/read_write.c:1122
 __x64_sys_pwritev2+0x78/0x90 fs/read_write.c:1122
 x64_sys_call+0xf52/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:329
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000ffffe394 -> 0x3072736827207972

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 6603 Comm: syz-executor.4 Not tainted 6.9.0-syzkaller-03117-gb850dc206a57 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================
EXT4-fs warning (device loop4): ext4_end_bio:347: I/O error 10 writing to inode 15 starting block 253)
Buffer I/O error on device loop4, logical block 253
Buffer I/O error on device loop4, logical block 254
syz-executor.4: attempt to access beyond end of device
loop4: rw=2049, sector=498, nr_sectors = 6 limit=64
EXT4-fs warning (device loop4): ext4_end_bio:347: I/O error 10 writing to inode 15 starting block 249)
Buffer I/O error on device loop4, logical block 249
Buffer I/O error on device loop4, logical block 250
syz-executor.4 (6603) used greatest stack depth: 8360 bytes left

Crashes (311):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/15 19:07 upstream b850dc206a57 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/05/14 00:19 upstream 8815da98e06a fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/05/04 10:37 upstream ddb4c3f25b7b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/04/29 15:07 upstream e67572cd2204 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/04/26 12:55 upstream c942a0cd3603 059e9963 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/04/25 12:06 upstream e88c4cfcb7b8 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/04/24 10:07 upstream 9d1ddab261f3 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/04/23 14:05 upstream 71b1543c83d6 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/04/21 12:24 upstream 977b1ef51866 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/04/13 16:39 upstream 8f2c057754b2 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/03/23 04:00 upstream bfa8f18691ed 4b6cdce6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/03/20 05:45 upstream a4145ce1e7bc a485f239 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/03/10 00:37 upstream 09e5c48fea17 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/03/07 19:59 upstream 135288b73cef 2b789849 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/03/04 02:37 upstream 58c806d867bf 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/28 21:39 upstream e326df53af00 55d6f11d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/24 19:38 upstream f2e367d6ad3b 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/24 11:58 upstream 603c04e27c3e 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/23 01:24 upstream 1c892cdd8fe0 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/13 19:32 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/11 19:18 upstream 7521f258ea30 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/11 06:40 upstream a5b6244cf87c 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/07 23:57 upstream 547ab8fc4cb0 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/02 19:10 upstream 021533194476 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/02/01 20:41 upstream 5c24e4e9e708 81024119 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/01/31 07:23 upstream 2a6526c4f389 7f400fcb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/01/20 15:20 upstream 9d64bf433c53 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/01/19 08:59 upstream 86c4d58a99ab 21772ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/01/10 14:17 upstream ab27740f7665 b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2024/01/01 19:21 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/29 19:30 upstream 8735c7c84d1b fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/26 05:07 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/24 22:53 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/23 11:21 upstream 5254c0cbc92d fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/22 07:45 upstream 9a6b294ab496 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/21 00:12 upstream 1a44b0073b92 de21eb89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/18 00:32 upstream 0e389834672c 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/15 01:41 upstream c7402612e2e6 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/14 16:47 upstream 5bd7ef53ffe5 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/13 11:48 upstream 88035e5694a8 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/12 15:05 upstream 26aff849438c ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2023/12/10 16:31 upstream c527f5606aa5 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2021/07/20 18:18 upstream 8cae8cd89f05 1b201b48 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2021/07/19 13:52 upstream 2734d6c1b1a0 e6a17580 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
2021/03/15 21:32 upstream 1e28eed17697 fdb2bb2c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / string
* Struck through repros no longer work on HEAD.