[moderation] [ext4?] KCSAN: data-race in data_alloc / data_push_tail (2)

1 view
Skip to first unread message

syzbot

unread,
Mar 2, 2024, 10:49:26 AMMar 2
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 39133352cbed Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=119489c2180000
kernel config: https://syzkaller.appspot.com/x/.config?x=7507056e4ee79a
dashboard link: https://syzkaller.appspot.com/bug?extid=0b6bbfde391a872ca112
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [adilger...@dilger.ca b...@alien8.de dave....@linux.intel.com h...@zytor.com jpoi...@kernel.org linux...@vger.kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org mi...@redhat.com pet...@infradead.org tg...@linutronix.de ty...@mit.edu x...@kernel.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/da67c50a8865/disk-39133352.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4ec0da5364e5/vmlinux-39133352.xz
kernel image: https://storage.googleapis.com/syzbot-assets/29aba2ced196/bzImage-39133352.xz

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

SELinux: unrecognized netlink message: protocol=0 nlmsg_type=9488 sclass=netlink_route_socket pid=16125 comm=syz-executor.2
==================================================================
BUG: KCSAN: data-race in data_alloc / data_push_tail

write to 0xffffffff87105e60 of 8 bytes by task 16120 on cpu 0:
data_alloc+0x216/0x2c0 kernel/printk/printk_ringbuffer.c:1074
prb_reserve+0x897/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
printk_stack_address arch/x86/kernel/dumpstack.c:72 [inline]
show_trace_log_lvl+0x42e/0x510 arch/x86/kernel/dumpstack.c:285
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xda/0x130 lib/dump_stack.c:106
dump_stack+0x15/0x20 lib/dump_stack.c:113
fail_dump lib/fault-inject.c:52 [inline]
should_fail_ex+0x21f/0x230 lib/fault-inject.c:153
should_fail+0xb/0x10 lib/fault-inject.c:163
should_fail_usercopy+0x1a/0x20 lib/fault-inject-usercopy.c:37
strncpy_from_user+0x25/0x270 lib/strncpy_from_user.c:118
getname_flags+0xb3/0x360 fs/namei.c:151
getname+0x19/0x20 fs/namei.c:219
do_sys_openat2+0x67/0x110 fs/open.c:1398
do_sys_open fs/open.c:1419 [inline]
__do_sys_openat fs/open.c:1435 [inline]
__se_sys_openat fs/open.c:1430 [inline]
__x64_sys_openat+0xf3/0x120 fs/open.c:1430
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+0x63/0x6b

read to 0xffffffff87105e60 of 8 bytes by task 16125 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+0x897/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
selinux_netlink_send+0x3fe/0x470 security/selinux/hooks.c:5964
security_netlink_send+0x3e/0x70 security/security.c:4113
netlink_sendmsg+0x563/0x770 net/netlink/af_netlink.c:1898
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
____sys_sendmsg+0x37c/0x4d0 net/socket.c:2584
___sys_sendmsg net/socket.c:2638 [inline]
__sys_sendmsg+0x1e9/0x270 net/socket.c:2667
__do_sys_sendmsg net/socket.c:2676 [inline]
__se_sys_sendmsg net/socket.c:2674 [inline]
__x64_sys_sendmsg+0x46/0x50 net/socket.c:2674
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+0x63/0x6b

value changed: 0x0000000100000483 -> 0x0000000100001775

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 16125 Comm: syz-executor.2 Tainted: G W 6.8.0-rc5-syzkaller-00029-g39133352cbed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages