KCSAN: data-race in data_push_tail / string

12 views
Skip to first unread message

syzbot

unread,
Jul 22, 2021, 3:23:22 PM7/22/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8cae8cd89f05 seq_file: disallow extremely large seq buffer..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1027fbf2300000
kernel config: https://syzkaller.appspot.com/x/.config?x=ce8fa05c1b3f3e8a
dashboard link: https://syzkaller.appspot.com/bug?extid=b3b8d0f2cecce376adeb
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1
CC: [ax...@kernel.dk ha...@suse.de ja...@suse.cz linux...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b3b8d0...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in data_push_tail / string

write to 0xffffffff8413ceba of 1 bytes by task 20438 on cpu 0:
string_nocheck lib/vsprintf.c:642 [inline]
string+0xa1/0x210 lib/vsprintf.c:720
vsnprintf+0xab0/0xed0 lib/vsprintf.c:2797
vscnprintf+0x29/0x80 lib/vsprintf.c:2900
printk_sprint kernel/printk/printk.c:2012 [inline]
vprintk_store+0x4c1/0x9c0 kernel/printk/printk.c:2115
vprintk_emit+0xca/0x3d0 kernel/printk/printk.c:2157
vprintk_default+0x22/0x30 kernel/printk/printk.c:2185
vprintk+0x15a/0x170 kernel/printk/printk_safe.c:392
printk+0x62/0x87 kernel/printk/printk.c:2216
blk_add_partitions block/partitions/core.c:644 [inline]
bdev_disk_changed+0xce1/0xea0 block/partitions/core.c:697
loop_reread_partitions drivers/block/loop.c:652 [inline]
loop_set_status+0x4dc/0x5a0 drivers/block/loop.c:1510
lo_ioctl+0x764/0x1210 drivers/block/loop.c:1620
blkdev_ioctl+0x1d0/0x3c0 block/ioctl.c:585
block_ioctl+0x6d/0x80 fs/block_dev.c:1602
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:1069 [inline]
__se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055
__x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffffff8413ceb8 of 8 bytes by task 20408 on cpu 1:
data_make_reusable kernel/printk/printk_ringbuffer.c:587 [inline]
data_push_tail+0x125/0x460 kernel/printk/printk_ringbuffer.c:672
data_realloc kernel/printk/printk_ringbuffer.c:1132 [inline]
prb_reserve_in_last+0x71c/0xba0 kernel/printk/printk_ringbuffer.c:1421
vprintk_store+0x311/0x9c0 kernel/printk/printk.c:2083
vprintk_emit+0xca/0x3d0 kernel/printk/printk.c:2157
vprintk_default+0x22/0x30 kernel/printk/printk.c:2185
vprintk+0x15a/0x170 kernel/printk/printk_safe.c:392
printk+0x62/0x87 kernel/printk/printk.c:2216
disk_unlock_native_capacity block/partitions/core.c:537 [inline]
blk_add_partitions block/partitions/core.c:647 [inline]
bdev_disk_changed+0xd98/0xea0 block/partitions/core.c:697
loop_reread_partitions drivers/block/loop.c:652 [inline]
loop_set_status+0x4dc/0x5a0 drivers/block/loop.c:1510
lo_ioctl+0x764/0x1210 drivers/block/loop.c:1620
blkdev_ioctl+0x1d0/0x3c0 block/ioctl.c:585
block_ioctl+0x6d/0x80 fs/block_dev.c:1602
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:1069 [inline]
__se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055
__x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000100029747 -> 0x70203a32706f6f6c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20408 Comm: syz-executor.5 Not tainted 5.14.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
Reply all
Reply to author
Forward
0 new messages