lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <03028b7f-95e8-4b9c-a52a-77b02f83fb21@gmail.com>
Date: Wed, 13 Nov 2024 11:42:48 +0000
From: Pavel Begunkov <asml.silence@...il.com>
To: syzbot <syzbot+5a486fef3de40e0d8c76@...kaller.appspotmail.com>,
 axboe@...nel.dk, io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
 syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [io-uring?] KCSAN: data-race in
 __se_sys_io_uring_register / io_sqe_files_register (3)

On 11/13/24 11:08, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    2d5404caa8c7 Linux 6.12-rc7
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=10e838c0580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=29fedde79f609854
> dashboard link: https://syzkaller.appspot.com/bug?extid=5a486fef3de40e0d8c76
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> 
> Unfortunately, I don't have any reproducer for this issue yet.
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/15a7713979b8/disk-2d5404ca.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/b51c4f695d4a/vmlinux-2d5404ca.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/e8c0f17bc00b/bzImage-2d5404ca.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+5a486fef3de40e0d8c76@...kaller.appspotmail.com
> 
> ==================================================================
> BUG: KCSAN: data-race in __se_sys_io_uring_register / io_sqe_files_register
> 
> read-write to 0xffff8881021940b8 of 4 bytes by task 5923 on cpu 1:
>   io_sqe_files_register+0x2c4/0x3b0 io_uring/rsrc.c:713
>   __io_uring_register io_uring/register.c:403 [inline]
>   __do_sys_io_uring_register io_uring/register.c:611 [inline]
>   __se_sys_io_uring_register+0x8d0/0x1280 io_uring/register.c:591
>   __x64_sys_io_uring_register+0x55/0x70 io_uring/register.c:591
>   x64_sys_call+0x202/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:428
>   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
>   do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
>   entry_SYSCALL_64_after_hwframe+0x77/0x7f
> 
> read to 0xffff8881021940b8 of 4 bytes by task 5924 on cpu 0:
>   __do_sys_io_uring_register io_uring/register.c:613 [inline]

Seems to point to tracing:

mutex_lock(&ctx->uring_lock);
ret = __io_uring_register(ctx, opcode, arg, nr_args);
mutex_unlock(&ctx->uring_lock);
trace_io_uring_register(ctx, opcode, ctx->nr_user_files, ctx->nr_user_bufs, ret);

And thus we don't care much about it, but we can just move it
one line up under the lock.

-- 
Pavel Begunkov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ