syzbot


KASAN: null-ptr-deref Write in btrfs_root_node

Status: auto-obsoleted due to no activity on 2023/08/22 05:04
Reported-by: syzbot+25c8a39dd9ca3fcbbfc0@syzkaller.appspotmail.com
First crash: 406d, last: 406d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: null-ptr-deref Write in btrfs_root_node (2) origin:lts-only C done 8 63d 259d 0/3 upstream: reported C repro on 2023/09/18 04:34

Sample crash report:
BTRFS info (device loop0): clearing free space tree
BTRFS info (device loop0): clearing compat-ro feature flag for FREE_SPACE_TREE (0x1)
BTRFS info (device loop0): clearing compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: null-ptr-deref in atomic_inc_not_zero include/linux/atomic/atomic-instrumented.h:577 [inline]
BUG: KASAN: null-ptr-deref in btrfs_root_node+0x103/0x370 fs/btrfs/ctree.c:138
Write of size 4 at addr 0000000000000060 by task syz-executor.0/4424

CPU: 1 PID: 4424 Comm: syz-executor.0 Not tainted 5.15.108-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 __kasan_report mm/kasan/report.c:438 [inline]
 kasan_report+0x161/0x1c0 mm/kasan/report.c:451
 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_inc_not_zero include/linux/atomic/atomic-instrumented.h:577 [inline]
 btrfs_root_node+0x103/0x370 fs/btrfs/ctree.c:138
 btrfs_read_lock_root_node+0x7b/0x3b0 fs/btrfs/locking.c:276
 btrfs_search_slot_get_root fs/btrfs/ctree.c:1605 [inline]
 btrfs_search_slot+0x4b2/0x28b0 fs/btrfs/ctree.c:1763
 btrfs_orphan_cleanup+0x211/0xcf0 fs/btrfs/inode.c:3534
 btrfs_cleanup_fs_roots+0x7a7/0xaf0 fs/btrfs/disk-io.c:4295
 btrfs_start_pre_rw_mount+0x1b5/0x680 fs/btrfs/disk-io.c:3092
 open_ctree+0x2d9c/0x34bf fs/btrfs/disk-io.c:3624
 btrfs_fill_super+0x1c7/0x2d0 fs/btrfs/super.c:1387
 btrfs_mount_root+0x80b/0x940 fs/btrfs/super.c:1752
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610
 vfs_get_tree+0x88/0x270 fs/super.c:1508
 fc_mount fs/namespace.c:1000 [inline]
 vfs_kern_mount+0xb8/0x150 fs/namespace.c:1030
 btrfs_mount+0x395/0xb40 fs/btrfs/super.c:1812
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610
 vfs_get_tree+0x88/0x270 fs/super.c:1508
 do_new_mount+0x28b/0xad0 fs/namespace.c:2994
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3522
 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:0x7f940e0fb69a
Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 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:00007f940c66bf88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00000000000050ff RCX: 00007f940e0fb69a
RDX: 0000000020005100 RSI: 0000000020005140 RDI: 00007f940c66bfe0
RBP: 00007f940c66c020 R08: 00007f940c66c020 R09: 0000000000c00c18
R10: 0000000000c00c18 R11: 0000000000000202 R12: 0000000020005100
R13: 0000000020005140 R14: 00007f940c66bfe0 R15: 0000000020000340
 </TASK>
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/24 05:04 linux-5.15.y 3299fb36854f 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: null-ptr-deref Write in btrfs_root_node
* Struck through repros no longer work on HEAD.