syzbot


WARNING in copy_mnt_ns

Status: upstream: reported C repro on 2025/10/01 20:18
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+e0f8855a87443d6a2413@syzkaller.appspotmail.com
First crash: 1d00h, last: 13h01m
Cause bisection: introduced by (bisect log) :
commit be5f21d3985f00827e09b798f7a07ebd6dd7f54a
Author: Christian Brauner <brauner@kernel.org>
Date: Wed Sep 17 10:28:08 2025 +0000

  ns: add ns_common_free()

Crash: WARNING in copy_mnt_ns (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] WARNING in copy_mnt_ns 2 (5) 2025/10/02 08:57
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/10/02 08:19 12m jack@suse.cz patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Honza error
2025/10/02 08:57 jack@suse.cz patch upstream pending

Sample crash report:
------------[ 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>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/01 17:36 upstream 50c19e20ed2e a1859138 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in copy_mnt_ns
2025/10/01 16:45 upstream 50c19e20ed2e a1859138 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in copy_mnt_ns
2025/10/01 15:51 upstream 50c19e20ed2e a1859138 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in copy_mnt_ns
2025/10/01 11:20 upstream 50c19e20ed2e 65a0eece .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in copy_mnt_ns
2025/10/01 22:23 upstream d3479214c05d 267f56c6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in copy_mnt_ns
* Struck through repros no longer work on HEAD.