[moderation] [kernel?] KCSAN: data-race in data_push_tail / hex_string (2)

3 views
Skip to first unread message

syzbot

unread,
Dec 15, 2023, 4:50:24 PM12/15/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f7168591ebf Merge tag '6.7-rc5-smb3-client-fixes' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10f3af71e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d6f4b50a94fc12a6
dashboard link: https://syzkaller.appspot.com/bug?extid=c14ab23aa665ac80ecd2
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [b...@alien8.de dave....@linux.intel.com h...@zytor.com jpoi...@kernel.org linux-...@vger.kernel.org mi...@redhat.com pet...@infradead.org tg...@linutronix.de x...@kernel.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8501f1a39e1b/disk-3f716859.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3e2530001de5/vmlinux-3f716859.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d58c9225bf5a/bzImage-3f716859.xz

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

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

write to 0xffffffff86ee22e0 of 1 bytes by task 28744 on cpu 0:
hex_string+0x2c1/0x310 lib/vsprintf.c:1186
pointer+0x308/0xd10 lib/vsprintf.c:2422
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
show_opcodes+0x145/0x170 arch/x86/kernel/dumpstack.c:123
show_ip arch/x86/kernel/dumpstack.c:144 [inline]
show_iret_regs+0x39/0x60 arch/x86/kernel/dumpstack.c:149
__show_regs+0x2b/0x430 arch/x86/kernel/process_64.c:75
show_trace_log_lvl+0x3d2/0x510 arch/x86/kernel/dumpstack.c:301
__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
_copy_to_user+0x1e/0x90 lib/usercopy.c:37
copy_to_user include/linux/uaccess.h:191 [inline]
copy_to_sockptr_offset include/linux/sockptr.h:85 [inline]
copy_to_sockptr include/linux/sockptr.h:92 [inline]
do_ipv6_getsockopt+0xac5/0x1420 net/ipv6/ipv6_sockglue.c:1466
ipv6_getsockopt+0x75/0x1e0 net/ipv6/ipv6_sockglue.c:1482
dccp_getsockopt+0xb9/0x1500 net/dccp/proto.c:687
sock_common_getsockopt+0x57/0x70 net/core/sock.c:3684
do_sock_getsockopt net/socket.c:2373 [inline]
__sys_getsockopt+0x1bf/0x230 net/socket.c:2402
__do_sys_getsockopt net/socket.c:2412 [inline]
__se_sys_getsockopt net/socket.c:2409 [inline]
__x64_sys_getsockopt+0x66/0x80 net/socket.c:2409
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffffffff86ee22e0 of 8 bytes by task 28759 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
fail_dump lib/fault-inject.c:45 [inline]
should_fail_ex+0x207/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
_copy_from_user+0x1e/0xd0 lib/usercopy.c:15
copy_from_user include/linux/uaccess.h:183 [inline]
copy_from_sockptr_offset include/linux/sockptr.h:48 [inline]
copy_from_sockptr include/linux/sockptr.h:55 [inline]
do_ipv6_getsockopt+0x12d/0x1420 net/ipv6/ipv6_sockglue.c:1123
ipv6_getsockopt+0x75/0x1e0 net/ipv6/ipv6_sockglue.c:1482
dccp_getsockopt+0xb9/0x1500 net/dccp/proto.c:687
sock_common_getsockopt+0x57/0x70 net/core/sock.c:3684
do_sock_getsockopt net/socket.c:2373 [inline]
__sys_getsockopt+0x1bf/0x230 net/socket.c:2402
__do_sys_getsockopt net/socket.c:2412 [inline]
__se_sys_getsockopt net/socket.c:2409 [inline]
__x64_sys_getsockopt+0x66/0x80 net/socket.c:2409
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000010000413c -> 0x3020303020303020

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 28759 Comm: syz-executor.0 Not tainted 6.7.0-rc5-syzkaller-00134-g3f7168591ebf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================
CPU: 1 PID: 28759 Comm: syz-executor.0 Not tainted 6.7.0-rc5-syzkaller-00134-g3f7168591ebf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
<TASK>
__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
_copy_from_user+0x1e/0xd0 lib/usercopy.c:15
copy_from_user include/linux/uaccess.h:183 [inline]
copy_from_sockptr_offset include/linux/sockptr.h:48 [inline]
copy_from_sockptr include/linux/sockptr.h:55 [inline]
do_ipv6_getsockopt+0x12d/0x1420 net/ipv6/ipv6_sockglue.c:1123
ipv6_getsockopt+0x75/0x1e0 net/ipv6/ipv6_sockglue.c:1482
dccp_getsockopt+0xb9/0x1500 net/dccp/proto.c:687
sock_common_getsockopt+0x57/0x70 net/core/sock.c:3684
do_sock_getsockopt net/socket.c:2373 [inline]
__sys_getsockopt+0x1bf/0x230 net/socket.c:2402
__do_sys_getsockopt net/socket.c:2412 [inline]
__se_sys_getsockopt net/socket.c:2409 [inline]
__x64_sys_getsockopt+0x66/0x80 net/socket.c:2409
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fac42906ba9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fac41c890c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007fac42a25f80 RCX: 00007fac42906ba9
RDX: 000000000000000b RSI: 0000000000000029 RDI: 0000000000000003
RBP: 00007fac41c89120 R08: 0000000020000140 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 000000000000000b R14: 00007fac42a25f80 R15: 00007fffd6961278
</TASK>


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

syzbot

unread,
Jan 19, 2024, 4:50:15 PMJan 19
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages