syzbot


KASAN: use-after-free Read in reiserfs_release_objectid

Status: upstream: reported C repro on 2022/12/04 21:28
Reported-by: syzbot+9eb708b6972efff5d594@syzkaller.appspotmail.com
First crash: 717d, last: 630d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in reiserfs_release_objectid 1 592d 592d 0/3 auto-obsoleted due to no activity on 2023/08/07 07:31
upstream KASAN: use-after-free Read in reiserfs_release_objectid reiserfs C error done 6 322d 723d 0/28 auto-obsoleted due to no activity on 2024/05/25 08:15
linux-5.15 KASAN: use-after-free Read in reiserfs_release_objectid origin:upstream C error 11 49d 120d 0/3 upstream: reported C repro on 2024/07/24 14:44
linux-4.19 KASAN: use-after-free Read in reiserfs_release_objectid reiserfs C error 2 648d 724d 0/1 upstream: reported C repro on 2022/11/28 17:34
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/03/02 02:44 31m bisect fix linux-4.14.y OK (0) job log log
2023/01/29 22:30 22m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
REISERFS (device loop0): journal params: device loop0, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
REISERFS (device loop0): checking transaction log (loop0)
REISERFS (device loop0): Using r5 hash to sort names
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
==================================================================
BUG: KASAN: use-after-free in memmove include/linux/string.h:391 [inline]
BUG: KASAN: use-after-free in reiserfs_release_objectid+0x41c/0x710 fs/reiserfs/objectid.c:165
Read of size 14568 at addr ffff88809fe060d0 by task syz-executor348/7985

CPU: 0 PID: 7985 Comm: syz-executor348 Not tainted 4.14.300-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report+0x6f/0x80 mm/kasan/report.c:409
 memmove+0x20/0x50 mm/kasan/kasan.c:293
 memmove include/linux/string.h:391 [inline]
 reiserfs_release_objectid+0x41c/0x710 fs/reiserfs/objectid.c:165
 remove_save_link+0x1e2/0x380 fs/reiserfs/super.c:542
 reiserfs_evict_inode+0x3e7/0x4a0 fs/reiserfs/inode.c:91
 evict+0x2c8/0x700 fs/inode.c:554
 iput_final fs/inode.c:1523 [inline]
 iput+0x458/0x7e0 fs/inode.c:1550
 dentry_unlink_inode+0x25c/0x310 fs/dcache.c:387
 __dentry_kill+0x320/0x550 fs/dcache.c:591
 dentry_kill fs/dcache.c:632 [inline]
 dput.part.0+0x4b5/0x710 fs/dcache.c:847
 dput+0x1b/0x30 fs/dcache.c:811
 SYSC_renameat2 fs/namei.c:4650 [inline]
 SyS_renameat2+0x96a/0xad0 fs/namei.c:4535
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

The buggy address belongs to the page:
page:ffffea00027f8180 count:2 mapcount:0 mapping:ffff8880b1d92a68 index:0x10
flags: 0xfff0000001106c(referenced|uptodate|lru|active|private|mappedtodisk)
raw: 00fff0000001106c ffff8880b1d92a68 0000000000000010 00000002ffffffff
raw: ffffea00029fe320 ffffea0002cf8c20 ffff88808cefbf18 ffff88823b3288c0
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff88823b3288c0

Memory state around the buggy address:
 ffff88809fe06f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88809fe06f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88809fe07000: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fb fb
                   ^
 ffff88809fe07080: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb
 ffff88809fe07100: fb fb fb fb fb fb fc fc fc fc fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/04 21:27 linux-4.14.y 179ef7fe8677 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: use-after-free Read in reiserfs_release_objectid
* Struck through repros no longer work on HEAD.