All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: syzbot <syzbot+763e12bbf004fb1062e4@syzkaller.appspotmail.com>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com,
	Penglei Jiang <superman.xpt@gmail.com>
Subject: Re: [syzbot] [io-uring?] WARNING: ODEBUG bug in io_sq_offload_create
Date: Tue, 17 Jun 2025 06:47:59 -0600	[thread overview]
Message-ID: <c655293b-b2da-497b-98a6-05399fd120f8@kernel.dk> (raw)
In-Reply-To: <6851237a.a70a0220.395abc.0208.GAE@google.com>

On 6/17/25 2:12 AM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    8c6bc74c7f89 Merge tag 'v6.16-rc1-smb3-client-fixes' of gi..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1745710c580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=1ab5c40b21ee326a
> dashboard link: https://syzkaller.appspot.com/bug?extid=763e12bbf004fb1062e4
> compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13ea3d70580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10c5710c580000
> 
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-8c6bc74c.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/b523997774df/vmlinux-8c6bc74c.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/da5178f1b34a/bzImage-8c6bc74c.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+763e12bbf004fb1062e4@syzkaller.appspotmail.com
> 
> R13: 0000000000000002 R14: 00007fad89109ab1 R15: 00007fad8910601d
>  </TASK>
> ------------[ cut here ]------------
> ODEBUG: free active (active state 1) object: ffff888024813bd0 object type: rcu_head hint: 0x0
> WARNING: CPU: 0 PID: 5941 at lib/debugobjects.c:612 debug_print_object+0x1a2/0x2b0 lib/debugobjects.c:612
> Modules linked in:
> CPU: 0 UID: 0 PID: 5941 Comm: syz-executor101 Not tainted 6.16.0-rc1-syzkaller-00236-g8c6bc74c7f89 #0 PREEMPT(full) 
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
> RIP: 0010:debug_print_object+0x1a2/0x2b0 lib/debugobjects.c:612
> Code: fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 54 41 56 48 8b 14 dd 00 8a 15 8c 4c 89 e6 48 c7 c7 80 7e 15 8c e8 bf 33 99 fc 90 <0f> 0b 90 90 58 83 05 56 99 c6 0b 01 48 83 c4 18 5b 5d 41 5c 41 5d
> RSP: 0018:ffffc90003f8fa78 EFLAGS: 00010282
> RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff817ae248
> RDX: ffff88803cd0a440 RSI: ffffffff817ae255 RDI: 0000000000000001
> RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
> R10: 0000000000000001 R11: 0000000000000001 R12: ffffffff8c158520
> R13: ffffffff8baeb4a0 R14: 0000000000000000 R15: ffffc90003f8fb78
> FS:  00007fad890686c0(0000) GS:ffff8880d6753000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007fad8911b362 CR3: 0000000031b29000 CR4: 0000000000352ef0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
>  <TASK>
>  __debug_check_no_obj_freed lib/debugobjects.c:1099 [inline]
>  debug_check_no_obj_freed+0x4b7/0x600 lib/debugobjects.c:1129
>  slab_free_hook mm/slub.c:2312 [inline]
>  slab_free mm/slub.c:4643 [inline]
>  kmem_cache_free+0x2ac/0x4d0 mm/slub.c:4745
>  put_task_struct include/linux/sched/task.h:145 [inline]
>  put_task_struct include/linux/sched/task.h:132 [inline]
>  io_sq_offload_create+0xe4b/0x1330 io_uring/sqpoll.c:517
>  io_uring_create io_uring/io_uring.c:3747 [inline]
>  io_uring_setup+0x1514/0x2120 io_uring/io_uring.c:3830
>  __do_sys_io_uring_setup io_uring/io_uring.c:3864 [inline]
>  __se_sys_io_uring_setup io_uring/io_uring.c:3855 [inline]
>  __x64_sys_io_uring_setup+0xc2/0x170 io_uring/io_uring.c:3855
>  do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
>  do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
> RIP: 0033:0x7fad890b6f99
> Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 1b 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:00007fad89068208 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9
> RAX: ffffffffffffffda RBX: 00007fad891393c8 RCX: 00007fad890b6f99
> RDX: 0000000000000000 RSI: 0000200000000200 RDI: 0000000000004d25
> RBP: 00007fad891393c0 R08: 00007fad89067fa6 R09: 0000000000003232
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007fad89068210
> R13: 0000000000000002 R14: 00007fad89109ab1 R15: 00007fad8910601d
>  </TASK>

Looks like fallout from a fix in the 6.16 kernel series, where:

commit ac0b8b327a5677dc6fecdf353d808161525b1ff0
Author: Penglei Jiang <superman.xpt@gmail.com>
Date:   Tue Jun 10 10:18:01 2025 -0700

    io_uring: fix use-after-free of sq->thread in __io_uring_show_fdinfo()

moves task_struct error handling to io_sq_thread(), but misses that
io_sq_offload_create() does it too for tctx allocation failure.

#syz test: git://git.kernel.dk/linux.git syztest

-- 
Jens Axboe


  reply	other threads:[~2025-06-17 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-17  8:12 [syzbot] [io-uring?] WARNING: ODEBUG bug in io_sq_offload_create syzbot
2025-06-17 12:47 ` Jens Axboe [this message]
2025-06-17 13:06   ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c655293b-b2da-497b-98a6-05399fd120f8@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=superman.xpt@gmail.com \
    --cc=syzbot+763e12bbf004fb1062e4@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.