syzbot


KASAN: use-after-free Write in udf_close_lvid

Status: upstream: reported C repro on 2022/12/07 21:30
Subsystems: udf
[Documentation on labels]
Reported-by: syzbot+8f0b5d9c11b806b5ad2e@syzkaller.appspotmail.com
First crash: 506d, last: 443d
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 442d 857d 0/1 upstream: reported C repro on 2021/12/21 15:22
linux-5.15 KASAN: use-after-free Write in udf_close_lvid origin:upstream C 12 4d00h 339d 0/3 upstream: reported C repro on 2023/05/23 16:31
linux-6.1 BUG: unable to handle kernel paging request in udf_close_lvid origin:upstream C 23 7d19h 391d 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 109d 703d 26/26 fixed on 2024/02/21 18:23
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/02/07 23:44 25m bisect fix linux-4.14.y job log (0) log

Sample crash report:
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000)
audit: type=1800 audit(1673206956.688:2): pid=7984 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor208" name="bus" dev="loop0" ino=861 res=0
==================================================================
BUG: KASAN: use-after-free in udf_close_lvid.isra.0+0x5a1/0x630 fs/udf/super.c:2044
Write of size 1 at addr ffff8881aafbac88 by task syz-executor208/7983

CPU: 0 PID: 7983 Comm: syz-executor208 Not tainted 4.14.302-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 mm/kasan/report.c:409 [inline]
 __asan_report_store1_noabort+0x68/0x70 mm/kasan/report.c:432
 udf_close_lvid.isra.0+0x5a1/0x630 fs/udf/super.c:2044
 udf_put_super+0x211/0x2a0 fs/udf/super.c:2354
 generic_shutdown_super+0x144/0x370 fs/super.c:446
 kill_block_super+0x95/0xe0 fs/super.c:1161
 deactivate_locked_super+0x6c/0xd0 fs/super.c:319
 deactivate_super+0x7f/0xa0 fs/super.c:350
 cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:191 [inline]
 exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f19fbee3e97
RSP: 002b:00007ffffd1de588 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f19fbee3e97
RDX: 00007ffffd1de649 RSI: 000000000000000a RDI: 00007ffffd1de640
RBP: 00007ffffd1de640 R08: 00000000ffffffff R09: 00007ffffd1de420
R10: 0000555555821683 R11: 0000000000000206 R12: 00007ffffd1df6b0
R13: 00005555558215f0 R14: 00007ffffd1de5b0 R15: 0000000000000001

The buggy address belongs to the page:
page:ffffea0006abee80 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x57ff00000000000()
raw: 057ff00000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: ffffea0006abeea0 ffffea0006abeea0 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881aafbab80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881aafbac00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881aafbac80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8881aafbad00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881aafbad80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/08 19:44 linux-4.14.y c4215ee4771b 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: use-after-free Write in udf_close_lvid
2023/01/05 09:39 linux-4.14.y c4215ee4771b 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: use-after-free Write in udf_close_lvid
2022/12/10 17:09 linux-4.14.y 65afe34ac33d 67be1ae7 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: use-after-free Write in udf_close_lvid
2022/12/07 21:29 linux-4.14.y 179ef7fe8677 d88f3abb .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: use-after-free Write in udf_close_lvid
* Struck through repros no longer work on HEAD.