syzbot


KASAN: use-after-free Write in udf_open_lvid

Status: auto-obsoleted due to no activity on 2024/02/24 06:52
Subsystems: udf
[Documentation on labels]
Reported-by: syzbot+f2f7a789f16fd4b09e88@syzkaller.appspotmail.com
First crash: 468d, last: 161d
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [udf?] KASAN: use-after-free Write in udf_open_lvid 0 (1) 2023/01/17 09:33
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/01/06 12:42 22m retest repro linux-next OK log
2023/10/28 09:25 15m retest repro linux-next report log
2023/08/18 19:24 17m retest repro linux-next report log
2023/04/23 09:49 13m retest repro linux-next report log

Sample crash report:
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000)
==================================================================
BUG: KASAN: use-after-free in udf_open_lvid.isra.0+0x24f/0x2a0 fs/udf/super.c:2043
Write of size 1 at addr ffff888094c48ac8 by task syz-executor318/5079

CPU: 0 PID: 5079 Comm: syz-executor318 Not tainted 6.2.0-rc3-next-20230112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:306 [inline]
 print_report+0x15e/0x45d mm/kasan/report.c:417
 kasan_report+0xc0/0xf0 mm/kasan/report.c:517
 udf_open_lvid.isra.0+0x24f/0x2a0 fs/udf/super.c:2043
 udf_fill_super+0x1474/0x1a40 fs/udf/super.c:2279
 mount_bdev+0x351/0x410 fs/super.c:1359
 legacy_get_tree+0x109/0x220 fs/fs_context.c:610
 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489
 do_new_mount fs/namespace.c:3145 [inline]
 path_mount+0x132a/0x1e20 fs/namespace.c:3475
 do_mount fs/namespace.c:3488 [inline]
 __do_sys_mount fs/namespace.c:3697 [inline]
 __se_sys_mount fs/namespace.c:3674 [inline]
 __x64_sys_mount+0x283/0x300 fs/namespace.c:3674
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f58020fdf1a
Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd5ab081b8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f58020fdf1a
RDX: 0000000020000c00 RSI: 0000000020000c40 RDI: 00007ffd5ab081d0
RBP: 00007ffd5ab081d0 R08: 00007ffd5ab08210 R09: 0000000000000bea
R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000004
R13: 0000555555add2c0 R14: 0000000000000000 R15: 00007ffd5ab08210
 </TASK>

The buggy address belongs to the physical page:
page:ffffea0002531200 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x94c48
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0002531208 ffffea0002531208 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)

Memory state around the buggy address:
 ffff888094c48980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888094c48a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888094c48a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                              ^
 ffff888094c48b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888094c48b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/13 09:25 linux-next 0a093b2893c7 96166539 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Write in udf_open_lvid
2023/11/16 06:51 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: slab-use-after-free Write in udf_open_lvid
2023/06/09 19:07 upstream 33f2b5785a2b 9018a337 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: unable to handle kernel paging request in udf_open_lvid
* Struck through repros no longer work on HEAD.