syzbot


KASAN: use-after-free Read in udf_free_inode (2)

Status: upstream: reported on 2025/09/17 07:23
Reported-by: syzbot+206d16b2ebe23bbf502f@syzkaller.appspotmail.com
First crash: 89d, last: 3d11h
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in udf_free_inode fs 19 1 1084d 1080d 0/29 auto-obsoleted due to no activity on 2023/03/26 23:00
linux-6.1 BUG: unable to handle kernel paging request in udf_free_inode (2) origin:upstream 19 C 24 16d 90d 0/3 upstream: reported C repro on 2025/09/16 08:14
linux-5.15 KASAN: use-after-free Read in udf_free_inode 19 1 337d 337d 0/3 auto-obsoleted due to no activity on 2025/04/22 09:43
linux-6.1 KASAN: use-after-free Read in udf_free_inode 19 1 532d 532d 0/3 auto-obsoleted due to no activity on 2024/10/09 09:17
upstream BUG: unable to handle kernel paging request in udf_free_inode udf 8 1 1510d 1506d 0/29 auto-closed as invalid on 2022/01/25 11:13
linux-6.1 BUG: unable to handle kernel paging request in udf_free_inode 8 1 404d 404d 0/3 auto-obsoleted due to no activity on 2025/02/14 07:32

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in le32_add_cpu include/linux/byteorder/generic.h:151 [inline]
BUG: KASAN: use-after-free in udf_free_inode+0x258/0x2d0 fs/udf/ialloc.c:-1
Read of size 4 at addr ffff888148aa2cb0 by task syz.3.4/4328

CPU: 1 PID: 4328 Comm: syz.3.4 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 le32_add_cpu include/linux/byteorder/generic.h:151 [inline]
 udf_free_inode+0x258/0x2d0 fs/udf/ialloc.c:-1
 evict+0x485/0x870 fs/inode.c:647
 do_unlinkat+0x3d8/0x6f0 fs/namei.c:4363
 __do_sys_unlink fs/namei.c:4404 [inline]
 __se_sys_unlink fs/namei.c:4402 [inline]
 __x64_sys_unlink+0x45/0x50 fs/namei.c:4402
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f876eb22749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f876cd68038 EFLAGS: 00000246 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 00007f876ed79090 RCX: 00007f876eb22749
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000180
RBP: 00007f876eba6f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f876ed79128 R14: 00007f876ed79090 R15: 00007ffd36ae4408
 </TASK>

The buggy address belongs to the page:
page:ffffea000522a880 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x148aa2
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 0000000000000000 ffffea0000000000 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 14914308654, free_ts 25687590411
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031
 alloc_slab_page mm/slub.c:1780 [inline]
 allocate_slab mm/slub.c:1917 [inline]
 new_slab+0xc0/0x4b0 mm/slub.c:1980
 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3013
 __slab_alloc mm/slub.c:3100 [inline]
 slab_alloc_node mm/slub.c:3191 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 kmem_cache_alloc_trace+0x1a5/0x2a0 mm/slub.c:3250
 kmalloc include/linux/slab.h:607 [inline]
 kzalloc include/linux/slab.h:738 [inline]
 kobject_uevent_env+0x27a/0x890 lib/kobject_uevent.c:539
 device_add+0x91c/0xfb0 drivers/base/core.c:3393
 cdev_device_add+0x1a4/0x340 fs/char_dev.c:549
 cec_devnode_register drivers/media/cec/core/cec-core.c:132 [inline]
 cec_register_adapter+0x29c/0x5f0 drivers/media/cec/core/cec-core.c:350
 vivid_create_devnodes+0x72d/0x2cd0 drivers/media/test-drivers/vivid/vivid-core.c:1438
 vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1976 [inline]
 vivid_probe+0x50a1/0x6950 drivers/media/test-drivers/vivid/vivid-core.c:2031
 platform_probe+0x137/0x1c0 drivers/base/platform.c:1391
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x284/0xc80 drivers/base/dd.c:595
 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page+0x94/0x280 mm/page_alloc.c:3396
 free_slab mm/slub.c:2020 [inline]
 discard_slab mm/slub.c:2026 [inline]
 __unfreeze_partials+0x1a5/0x200 mm/slub.c:2512
 put_cpu_partial+0x12d/0x190 mm/slub.c:2592
 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3225 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 kmem_cache_alloc+0x100/0x290 mm/slub.c:3238
 getname_flags+0xb5/0x500 fs/namei.c:138
 do_sys_openat2+0xcf/0x4a0 fs/open.c:1249
 do_sys_open fs/open.c:1271 [inline]
 __do_sys_openat fs/open.c:1287 [inline]
 __se_sys_openat fs/open.c:1282 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1282
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Memory state around the buggy address:
 ffff888148aa2b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888148aa2c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888148aa2c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                     ^
 ffff888148aa2d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888148aa2d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/12 11:49 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in udf_free_inode
2025/09/17 07:23 linux-5.15.y 43bb85222e53 e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in udf_free_inode
* Struck through repros no longer work on HEAD.