syzbot


KASAN: null-ptr-deref Read in ida_free (3)

Status: fixed on 2023/06/08 14:41
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+8ac3859139c685c4f597@syzkaller.appspotmail.com
Fix commit: cb2239c198ad fs: drop peer group ids under namespace lock
First crash: 398d, last: 398d
Cause bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] fs: drop peer group ids under namespace lock 2 (2) 2023/03/31 10:36
[syzbot] [fs?] KASAN: null-ptr-deref Read in ida_free (3) 1 (3) 2023/03/30 06:52
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: null-ptr-deref Read in ida_free C error 2 327d 398d 2/2 fixed on 2023/06/16 14:10
upstream KASAN: null-ptr-deref Read in ida_free media 1 1234d 1233d 0/26 auto-closed as invalid on 2021/04/09 00:32
upstream KASAN: null-ptr-deref Read in ida_free (2) usb C done 3 672d 672d 22/26 fixed on 2023/02/24 13:50
upstream KASAN: null-ptr-deref Read in ida_free (4) bluetooth C done done 29 125d 164d 26/26 fixed on 2024/02/14 16:17
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/03/30 06:22 29m brauner@kernel.org git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git b4/vfs-mount_setattr-propagation-fix OK log
2023/03/30 03:39 27m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git da8e7da11e4b OK log

Sample crash report:
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: null-ptr-deref in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
BUG: KASAN: null-ptr-deref in ida_free+0x1b9/0x400 lib/idr.c:511
Read of size 8 at addr 0000000000000000 by task syz-executor237/5830

CPU: 1 PID: 5830 Comm: syz-executor237 Not tainted 6.3.0-rc3-syzkaller-00338-gda8e7da11e4b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 print_report+0xe6/0x540 mm/kasan/report.c:433
 kasan_report+0x176/0x1b0 mm/kasan/report.c:536
 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
 ida_free+0x1b9/0x400 lib/idr.c:511
 mnt_release_group_id fs/namespace.c:160 [inline]
 cleanup_group_ids fs/namespace.c:2093 [inline]
 do_mount_setattr fs/namespace.c:4188 [inline]
 __do_sys_mount_setattr fs/namespace.c:4375 [inline]
 __se_sys_mount_setattr+0xc44/0x1b00 fs/namespace.c:4334
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7efc4b190919
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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:00007efc4b142318 EFLAGS: 00000246 ORIG_RAX: 00000000000001ba
RAX: ffffffffffffffda RBX: 00007efc4b2183e8 RCX: 00007efc4b190919
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007efc4b2183e0 R08: 0000000000000020 R09: 0000000000000000
R10: 0000000020000140 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 00007ffe5a122bdf R14: 00007efc4b142400 R15: 0000000000022000
 </TASK>
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/26 02:43 upstream da8e7da11e4b fbf0499a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Read in ida_free
2023/03/26 02:07 upstream 4bdec23f971b fbf0499a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: null-ptr-deref Read in ida_free
2023/03/26 01:30 upstream 4bdec23f971b fbf0499a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: null-ptr-deref Read in ida_free
2023/03/26 00:25 upstream 4bdec23f971b fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: null-ptr-deref Read in ida_free
* Struck through repros no longer work on HEAD.