[syzbot] [fs?] WARNING in copy_mnt_ns

1 view
Skip to first unread message

syzbot

unread,
Oct 1, 2025, 4:18:36 PM (22 hours ago) Oct 1
to bra...@kernel.org, ja...@suse.cz, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
Hello,

syzbot found the following issue on:

HEAD commit: 50c19e20ed2e Merge tag 'nolibc-20250928-for-6.18-1' of git..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=126f605b980000
kernel config: https://syzkaller.appspot.com/x/.config?x=8f1ac8502efee0ee
dashboard link: https://syzkaller.appspot.com/bug?extid=e0f8855a87443d6a2413
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1374b858580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15602092580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5fb1f87b20e9/disk-50c19e20.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/aebfd0341e80/vmlinux-50c19e20.xz
kernel image: https://storage.googleapis.com/syzbot-assets/11452a5eed6c/bzImage-50c19e20.xz

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

------------[ cut here ]------------
ida_free called for id=1019 which is not allocated.
WARNING: CPU: 1 PID: 6112 at lib/idr.c:592 ida_free+0x280/0x310 lib/idr.c:592
Modules linked in:
CPU: 1 UID: 0 PID: 6112 Comm: syz.4.41 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
RIP: 0010:ida_free+0x280/0x310 lib/idr.c:592
Code: 00 00 00 00 fc ff df 48 8b 5c 24 10 48 8b 7c 24 40 48 89 de e8 71 2c 0c 00 90 48 c7 c7 a0 7b 76 8c 44 89 fe e8 41 11 54 f6 90 <0f> 0b 90 90 eb 34 e8 85 a2 90 f6 49 bd 00 00 00 00 00 fc ff df eb
RSP: 0018:ffffc90003087b60 EFLAGS: 00010246

RAX: d54b8a9e76833a00 RBX: 0000000000000a02 RCX: ffff888026663c80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: ffffc90003087c60 R08: ffff8880b8924293 R09: 1ffff11017124852
R10: dffffc0000000000 R11: ffffed1017124853 R12: 1ffff92000610f70
R13: dffffc0000000000 R14: ffff88801d6d9000 R15: 00000000000003fb
FS: 000055558bcc4500(0000) GS:ffff888126473000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007feaa252acf0 CR3: 000000005ee84000 CR4: 00000000003526f0
Call Trace:
<TASK>
copy_mnt_ns+0x197/0x820 fs/namespace.c:4168
create_new_namespaces+0xd1/0x720 kernel/nsproxy.c:78
unshare_nsproxy_namespaces+0x11c/0x170 kernel/nsproxy.c:218
ksys_unshare+0x4c8/0x8c0 kernel/fork.c:3132
__do_sys_unshare kernel/fork.c:3203 [inline]
__se_sys_unshare kernel/fork.c:3201 [inline]
__x64_sys_unshare+0x38/0x50 kernel/fork.c:3201
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7feaa258eec9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd780455e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007feaa27e5fa0 RCX: 00007feaa258eec9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000002a020400
RBP: 00007ffd78045640 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007feaa27e5fa0 R14: 00007feaa27e5fa0 R15: 0000000000000001
</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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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,
4:06 AM (10 hours ago) 4:06 AM
to ak...@linux-foundation.org, anna-...@linutronix.de, anna.sc...@oracle.com, bodo...@redhat.com, bra...@kernel.org, cgr...@vger.kernel.org, cyp...@cyphar.com, da...@davemloft.net, edum...@google.com, fred...@kernel.org, han...@cmpxchg.org, ho...@kernel.org, ja...@suse.cz, jla...@kernel.org, joel.g...@kernel.org, ku...@kernel.org, kun...@google.com, linux-...@vger.kernel.org, linux-...@vger.kernel.org, mawu...@huawei.com, mko...@suse.com, net...@vger.kernel.org, pab...@redhat.com, ros...@goodmis.org, s...@queasysnail.net, syzkall...@googlegroups.com, tg...@linutronix.de, t...@kernel.org, vi...@zeniv.linux.org.uk
syzbot has bisected this issue to:

commit be5f21d3985f00827e09b798f7a07ebd6dd7f54a
Author: Christian Brauner <bra...@kernel.org>
Date: Wed Sep 17 10:28:08 2025 +0000

ns: add ns_common_free()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=135eeee2580000
start commit: 50c19e20ed2e Merge tag 'nolibc-20250928-for-6.18-1' of git..
git tree: upstream
final oops: https://syzkaller.appspot.com/x/report.txt?x=10deeee2580000
console output: https://syzkaller.appspot.com/x/log.txt?x=175eeee2580000
Reported-by: syzbot+e0f885...@syzkaller.appspotmail.com
Fixes: be5f21d3985f ("ns: add ns_common_free()")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Jan Kara

unread,
4:19 AM (10 hours ago) 4:19 AM
to syzbot, bra...@kernel.org, ja...@suse.cz, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
On Wed 01-10-25 13:18:33, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 50c19e20ed2e Merge tag 'nolibc-20250928-for-6.18-1' of git..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=126f605b980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=8f1ac8502efee0ee
> dashboard link: https://syzkaller.appspot.com/bug?extid=e0f8855a87443d6a2413
> compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1374b858580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15602092580000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/5fb1f87b20e9/disk-50c19e20.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/aebfd0341e80/vmlinux-50c19e20.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/11452a5eed6c/bzImage-50c19e20.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+e0f885...@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> ida_free called for id=1019 which is not allocated.

Please try attached patch:

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Honza
--
Jan Kara <ja...@suse.com>
SUSE Labs, CR
0001-ns-Fix-mnt-ns-ida-handling-in-copy_mnt_ns.patch

syzbot

unread,
4:33 AM (10 hours ago) 4:33 AM
to bra...@kernel.org, ja...@suse.cz, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/Honza: failed to run ["git" "fetch" "--force" "f569e972c8e9057ee9c286220c83a480ebf30cc5" "Honza"]: exit status 128
fatal: couldn't find remote ref Honza



Tested on:

commit: [unknown
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Honza
patch: https://syzkaller.appspot.com/x/patch.diff?x=1411285b980000

Jan Kara

unread,
4:57 AM (10 hours ago) 4:57 AM
to syzbot, bra...@kernel.org, ja...@suse.cz, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
On Wed 01-10-25 13:18:33, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 50c19e20ed2e Merge tag 'nolibc-20250928-for-6.18-1' of git..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=126f605b980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=8f1ac8502efee0ee
> dashboard link: https://syzkaller.appspot.com/bug?extid=e0f8855a87443d6a2413
> compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1374b858580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15602092580000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/5fb1f87b20e9/disk-50c19e20.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/aebfd0341e80/vmlinux-50c19e20.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/11452a5eed6c/bzImage-50c19e20.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+e0f885...@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> ida_free called for id=1019 which is not allocated.

Let's try second time: Please try attached patch:

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
0001-ns-Fix-mnt-ns-ida-handling-in-copy_mnt_ns.patch

syzbot

unread,
10:36 AM (4 hours ago) 10:36 AM
to bra...@kernel.org, ja...@suse.cz, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+e0f885...@syzkaller.appspotmail.com
Tested-by: syzbot+e0f885...@syzkaller.appspotmail.com

Tested on:

commit: 7f707257 Merge tag 'kbuild-6.18-1' of git://git.kernel..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1190c92f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=f9d13d0fd373120a
dashboard link: https://syzkaller.appspot.com/bug?extid=e0f8855a87443d6a2413
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=1137e092580000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages