syzbot


KASAN: use-after-free Write in udf_close_lvid

Status: upstream: reported C repro on 2023/05/23 16:31
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+61564e5023b7229ec85d@syzkaller.appspotmail.com
First crash: 352d, last: 1d23h
Bug presence (1)
Date Name Commit Repro Result
2023/05/23 upstream (ToT) ae8373a5add4 C [report] KASAN: use-after-free Read in crc_itu_t
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Write in udf_close_lvid udf C error 5 455d 870d 0/1 upstream: reported C repro on 2021/12/21 15:22
linux-4.14 KASAN: use-after-free Write in udf_close_lvid udf C 4 457d 519d 0/1 upstream: reported C repro on 2022/12/07 21:30
linux-6.1 BUG: unable to handle kernel paging request in udf_close_lvid origin:upstream C 23 21d 405d 0/3 upstream: reported C repro on 2023/04/01 11:57
upstream KASAN: use-after-free Write in udf_close_lvid udf C done 144 123d 717d 26/26 fixed on 2024/02/21 18:23
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2024/03/25 01:46 1h06m bisect fix linux-5.15.y job log (0) log
2024/02/23 14:18 59m bisect fix linux-5.15.y job log (0) log
2024/01/14 18:39 1h31m bisect fix linux-5.15.y job log (0) log
2023/12/10 01:52 1h16m bisect fix linux-5.15.y job log (0) log
2023/11/09 21:23 1h26m bisect fix linux-5.15.y job log (0) log
2023/10/06 23:00 59m bisect fix linux-5.15.y job log (0) log

Sample crash report:
=======================================================
UDF-fs: error (device loop0): udf_read_tagged: tag checksum failed, block 99: 0x27 != 0x4d
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000)
==================================================================
BUG: KASAN: use-after-free in udf_close_lvid+0x6a4/0x9a0 fs/udf/super.c:2076
Write of size 1 at addr ffff88808c312068 by task syz-executor296/3501

CPU: 0 PID: 3501 Comm: syz-executor296 Not tainted 5.15.158-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 udf_close_lvid+0x6a4/0x9a0 fs/udf/super.c:2076
 udf_put_super+0xc9/0x160 fs/udf/super.c:2363
 generic_shutdown_super+0x136/0x2c0 fs/super.c:475
 kill_block_super+0x7a/0xe0 fs/super.c:1414
 deactivate_locked_super+0xa0/0x110 fs/super.c:335
 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143
 task_work_run+0x129/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0x6a3/0x2480 kernel/exit.c:872
 do_group_exit+0x144/0x310 kernel/exit.c:994
 __do_sys_exit_group kernel/exit.c:1005 [inline]
 __se_sys_exit_group kernel/exit.c:1003 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1003
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f7b9d456d89
Code: Unable to access opcode bytes at RIP 0x7f7b9d456d5f.
RSP: 002b:00007ffc78616c38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f7b9d456d89
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f7b9d4f2390 R08: ffffffffffffffb8 R09: 000000000001f22c
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7b9d4f2390
R13: 0000000000000000 R14: 00007f7b9d4f3100 R15: 00007f7b9d425060
 </TASK>

The buggy address belongs to the page:
page:ffffea000230c480 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8c312
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea000230c488 ffffea000230c488 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:
 ffff88808c311f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88808c311f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88808c312000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                          ^
 ffff88808c312080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88808c312100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/08 13:40 linux-5.15.y 284087d4f7d5 4cf3f9b3 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: use-after-free Write in udf_close_lvid
2023/05/23 16:31 linux-5.15.y 9d6bde853685 4bce1a3e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: use-after-free Write in udf_close_lvid
2023/07/19 16:32 linux-5.15.y d54cfc420586 022df2bb .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: use-after-free Write in udf_close_lvid
2023/06/08 21:43 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: use-after-free Write in udf_close_lvid
2023/06/08 16:11 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: use-after-free Write in udf_close_lvid
2023/05/29 07:12 linux-5.15.y 1fe619a7d252 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: use-after-free Write in udf_close_lvid
2024/04/19 12:55 linux-5.15.y c52b9710c83d af24b050 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan BUG: unable to handle kernel paging request in udf_close_lvid
2023/08/11 14:00 linux-5.15.y c275eaaaa342 da3c3ef8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_close_lvid
2023/06/19 05:45 linux-5.15.y 471e639e59d1 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan BUG: unable to handle kernel paging request in udf_close_lvid
2023/05/28 19:13 linux-5.15.y 1fe619a7d252 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan BUG: unable to handle kernel paging request in udf_close_lvid
2023/12/14 21:30 linux-5.15.y d0fc081c6241 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in udf_close_lvid
2024/04/22 22:45 linux-5.15.y c52b9710c83d 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel paging request in udf_close_lvid
2024/04/22 22:39 linux-5.15.y c52b9710c83d 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel paging request in udf_close_lvid
* Struck through repros no longer work on HEAD.