syzbot


KASAN: use-after-free Read in reiserfs_release_objectid

Status: auto-obsoleted due to no activity on 2023/08/07 07:31
Reported-by: syzbot+1674a35e419f2a620067@syzkaller.appspotmail.com
First crash: 379d, last: 379d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in reiserfs_release_objectid C 1 417d 505d 0/1 upstream: reported C repro on 2022/12/04 21:28
upstream KASAN: use-after-free Read in reiserfs_release_objectid reiserfs C error done 6 109d 510d 0/26 upstream: reported C repro on 2022/11/29 10:22
linux-4.19 KASAN: use-after-free Read in reiserfs_release_objectid reiserfs C error 2 435d 511d 0/1 upstream: reported C repro on 2022/11/28 17:34

Sample crash report:
REISERFS warning (device loop5): vs-2180 finish_unfinished: iget failed for [-2147416575 16777215 0x0 SD]
==================================================================
BUG: KASAN: use-after-free in reiserfs_release_objectid+0x454/0x63c fs/reiserfs/objectid.c:165
Read of size 114652 at addr ffff000133f44070 by task syz-executor.5/9840

CPU: 0 PID: 9840 Comm: syz-executor.5 Not tainted 6.1.23-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x174/0x4c0 mm/kasan/report.c:395
 kasan_report+0xd4/0x130 mm/kasan/report.c:495
 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189
 memmove+0x48/0x90 mm/kasan/shadow.c:54
 reiserfs_release_objectid+0x454/0x63c fs/reiserfs/objectid.c:165
 remove_save_link_only fs/reiserfs/super.c:207 [inline]
 finish_unfinished+0x9b0/0x1220 fs/reiserfs/super.c:331
 reiserfs_remount+0xec4/0x13f4 fs/reiserfs/super.c:1584
 legacy_reconfigure+0xfc/0x114 fs/fs_context.c:633
 reconfigure_super+0x328/0x738 fs/super.c:957
 vfs_fsconfig_locked fs/fsopen.c:254 [inline]
 __do_sys_fsconfig fs/fsopen.c:439 [inline]
 __se_sys_fsconfig fs/fsopen.c:314 [inline]
 __arm64_sys_fsconfig+0xa1c/0xd18 fs/fsopen.c:314
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

The buggy address belongs to the physical page:
page:00000000853190d3 refcount:2 mapcount:0 mapping:00000000ce82aa51 index:0x10 pfn:0x173f44
memcg:ffff0000d6c6c000
aops:def_blk_aops ino:700005
flags: 0x5ffca000000205a(referenced|dirty|lru|workingset|private|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffca000000205a fffffc0004ea45c8 fffffc0004b131c8 ffff0000c0517610
raw: 0000000000000010 ffff0000c0660570 00000002ffffffff ffff0000d6c6c000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff000133f47f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff000133f47f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff000133f48000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff000133f48080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff000133f48100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
REISERFS warning: reiserfs-5093 is_leaf: item entry count seems wrong *3.5*[2 1 0(1) DIR], item_len 35, item_location 3985, free_space(entry_count) 2
REISERFS error (device loop5): vs-5150 search_by_key: invalid format found in block 531. Fsck?
REISERFS (device loop5): Remounting filesystem read-only
REISERFS error (device loop5): vs-13050 reiserfs_update_sd_size: i/o failure occurred trying to update [2 1 0x0 SD] stat data
REISERFS warning: reiserfs-5093 is_leaf: item entry count seems wrong *3.5*[2 1 0(1) DIR], item_len 35, item_location 3985, free_space(entry_count) 2
REISERFS error (device loop5): vs-5150 search_by_key: invalid format found in block 531. Fsck?
REISERFS error (device loop5): zam-7001 reiserfs_find_entry: io error
REISERFS warning: reiserfs-5093 is_leaf: item entry count seems wrong *3.5*[2 1 0(1) DIR], item_len 35, item_location 3985, free_space(entry_count) 2
REISERFS error (device loop5): vs-5150 search_by_key: invalid format found in block 531. Fsck?
REISERFS error (device loop5): vs-13050 reiserfs_update_sd_size: i/o failure occurred trying to update [2 1 0x0 SD] stat data
REISERFS warning (device loop5): jdm-20006 create_privroot: xattrs/ACLs enabled and couldn't find/create .reiserfs_priv. Failing mount.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/09 07:31 linux-6.1.y 543aff194ab6 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in reiserfs_release_objectid
* Struck through repros no longer work on HEAD.