================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: null-ptr-deref in test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline] BUG: KASAN: null-ptr-deref in ida_free+0x1bc/0x3f0 lib/idr.c:511 Read of size 8 at addr 0000000000000000 by task syz-executor.4/11681 CPU: 1 PID: 11681 Comm: syz-executor.4 Not tainted 5.15.106-syzkaller-00249-g19c0ed55a470 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 __kasan_report mm/kasan/report.c:431 [inline] kasan_report+0x16f/0x1c0 mm/kasan/report.c:444 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:71 [inline] test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline] ida_free+0x1bc/0x3f0 lib/idr.c:511 mnt_release_group_id fs/namespace.c:159 [inline] cleanup_group_ids fs/namespace.c:2048 [inline] do_mount_setattr fs/namespace.c:4126 [inline] __do_sys_mount_setattr fs/namespace.c:4310 [inline] __se_sys_mount_setattr+0xbcf/0x1ca0 fs/namespace.c:4269 __x64_sys_mount_setattr+0xbf/0xd0 fs/namespace.c:4269 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc295fe4169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc294d36168 EFLAGS: 00000246 ORIG_RAX: 00000000000001ba RAX: ffffffffffffffda RBX: 00007fc296104050 RCX: 00007fc295fe4169 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 000000000000000b RBP: 00007fc29603fca1 R08: 0000000000000020 R09: 0000000000000000 R10: 0000000020000140 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd16855f5f R14: 00007fc294d36300 R15: 0000000000022000 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 188f13067 P4D 188f13067 PUD 1106e7067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 11681 Comm: syz-executor.4 Tainted: G B 5.15.106-syzkaller-00249-g19c0ed55a470 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 RIP: 0010:variable_test_bit arch/x86/include/asm/bitops.h:214 [inline] RIP: 0010:test_bit include/asm-generic/bitops/instrumented-non-atomic.h:135 [inline] RIP: 0010:ida_free+0x1bf/0x3f0 lib/idr.c:511 Code: eb fe 4c 89 e8 48 83 e0 01 0f 85 b9 00 00 00 41 89 de c1 eb 06 4d 8d 64 dd 00 4c 89 e7 be 08 00 00 00 e8 14 60 2c ff 45 31 ff <4d> 0f a3 75 00 0f 92 c3 41 0f 92 c7 bf 02 00 00 00 44 89 fe e8 a8 RSP: 0018:ffffc90000db7c80 EFLAGS: 00010046 RAX: ffff88811367bb00 RBX: 0000000000000000 RCX: ffff88811367bb40 RDX: 0000000000000000 RSI: 0000000000000096 RDI: 00000000ffffffff RBP: ffffc90000db7d70 R08: ffffffff8141671b R09: 0000000000000003 R10: fffffbfff0e4f84c R11: dffffc0000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000 FS: 00007fc294d36700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001296b8000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mnt_release_group_id fs/namespace.c:159 [inline] cleanup_group_ids fs/namespace.c:2048 [inline] do_mount_setattr fs/namespace.c:4126 [inline] __do_sys_mount_setattr fs/namespace.c:4310 [inline] __se_sys_mount_setattr+0xbcf/0x1ca0 fs/namespace.c:4269 __x64_sys_mount_setattr+0xbf/0xd0 fs/namespace.c:4269 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc295fe4169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc294d36168 EFLAGS: 00000246 ORIG_RAX: 00000000000001ba RAX: ffffffffffffffda RBX: 00007fc296104050 RCX: 00007fc295fe4169 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 000000000000000b RBP: 00007fc29603fca1 R08: 0000000000000020 R09: 0000000000000000 R10: 0000000020000140 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd16855f5f R14: 00007fc294d36300 R15: 0000000000022000 Modules linked in: CR2: 0000000000000000 ---[ end trace 1faff34bb06660dc ]--- RIP: 0010:variable_test_bit arch/x86/include/asm/bitops.h:214 [inline] RIP: 0010:test_bit include/asm-generic/bitops/instrumented-non-atomic.h:135 [inline] RIP: 0010:ida_free+0x1bf/0x3f0 lib/idr.c:511 Code: eb fe 4c 89 e8 48 83 e0 01 0f 85 b9 00 00 00 41 89 de c1 eb 06 4d 8d 64 dd 00 4c 89 e7 be 08 00 00 00 e8 14 60 2c ff 45 31 ff <4d> 0f a3 75 00 0f 92 c3 41 0f 92 c7 bf 02 00 00 00 44 89 fe e8 a8 RSP: 0018:ffffc90000db7c80 EFLAGS: 00010046 RAX: ffff88811367bb00 RBX: 0000000000000000 RCX: ffff88811367bb40 RDX: 0000000000000000 RSI: 0000000000000096 RDI: 00000000ffffffff RBP: ffffc90000db7d70 R08: ffffffff8141671b R09: 0000000000000003 R10: fffffbfff0e4f84c R11: dffffc0000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000 FS: 00007fc294d36700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001296b8000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: eb fe jmp 0x0 2: 4c 89 e8 mov %r13,%rax 5: 48 83 e0 01 and $0x1,%rax 9: 0f 85 b9 00 00 00 jne 0xc8 f: 41 89 de mov %ebx,%r14d 12: c1 eb 06 shr $0x6,%ebx 15: 4d 8d 64 dd 00 lea 0x0(%r13,%rbx,8),%r12 1a: 4c 89 e7 mov %r12,%rdi 1d: be 08 00 00 00 mov $0x8,%esi 22: e8 14 60 2c ff callq 0xff2c603b 27: 45 31 ff xor %r15d,%r15d * 2a: 4d 0f a3 75 00 bt %r14,0x0(%r13) <-- trapping instruction 2f: 0f 92 c3 setb %bl 32: 41 0f 92 c7 setb %r15b 36: bf 02 00 00 00 mov $0x2,%edi 3b: 44 89 fe mov %r15d,%esi 3e: e8 .byte 0xe8 3f: a8 .byte 0xa8