syzbot


KASAN: slab-out-of-bounds Write in udf_write_aext (2)

Status: upstream: reported on 2025/07/15 07:05
Subsystems: udf
[Documentation on labels]
Reported-by: syzbot+4e1da0d327b65949fe1b@syzkaller.appspotmail.com
First crash: 16d, last: 9h06m
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly udf report (Jul 2025) 0 (1) 2025/07/26 20:43
[syzbot] [udf?] KASAN: slab-out-of-bounds Write in udf_write_aext (2) 0 (1) 2025/07/15 07:05
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: slab-out-of-bounds Write in udf_write_aext origin:lts-only 24 C error 7050 278d 869d 0/3 auto-obsoleted due to no activity on 2025/01/22 09:20
linux-6.1 KASAN: slab-out-of-bounds Write in udf_write_aext origin:lts-only 24 C done 5821 279d 869d 0/3 upstream: reported C repro on 2023/03/11 14:12
linux-4.14 KASAN: slab-out-of-bounds Write in udf_write_aext udf f2fs tmpfs 23 C 17 874d 1036d 0/1 upstream: reported C repro on 2022/09/25 01:59
upstream KASAN: slab-out-of-bounds Write in udf_write_aext udf 24 C error error 674 874d 1035d 0/29 auto-obsoleted due to no activity on 2023/07/26 07:31
linux-4.19 KASAN: slab-out-of-bounds Write in udf_write_aext udf tmpfs erofs 23 C error 67 874d 1365d 0/1 upstream: reported C repro on 2021/10/31 06:20

Sample crash report:
 udf_setattr+0x3a1/0x5a0 fs/udf/file.c:236
 notify_change+0xb36/0xe40 fs/attr.c:552
 do_truncate+0x1a4/0x220 fs/open.c:68
 handle_truncate fs/namei.c:3517 [inline]
 do_open fs/namei.c:3900 [inline]
 path_openat+0x306c/0x3830 fs/namei.c:4055
 do_filp_open+0x1fa/0x410 fs/namei.c:4082
 do_sys_openat2+0x121/0x1c0 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_creat fs/open.c:1530 [inline]
 __se_sys_creat fs/open.c:1524 [inline]
 __x64_sys_creat+0x8f/0xc0 fs/open.c:1524
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f66be98e9a9
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:00007f66bf7f9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007f66bebb5fa0 RCX: 00007f66be98e9a9
RDX: 0000000000000000 RSI: 0000000000000011 RDI: 00002000000002c0
RBP: 00007f66bea10d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f66bebb5fa0 R15: 00007ffc50afd918
 </TASK>
getblk(): invalid block size 512 requested
logical block size: 2048
CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted 6.16.0-rc7-syzkaller-00140-gec2df4364666 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 __getblk_slow fs/buffer.c:1133 [inline]
 bdev_getblk+0x5b0/0x690 fs/buffer.c:1467
 __getblk include/linux/buffer_head.h:382 [inline]
 sb_getblk include/linux/buffer_head.h:388 [inline]
 udf_setup_indirect_aext+0x190/0x800 fs/udf/inode.c:1998
 udf_table_free_blocks fs/udf/balloc.c:472 [inline]
 udf_free_blocks+0x13f2/0x17f0 fs/udf/balloc.c:677
 extent_trunc+0x35c/0x450 fs/udf/truncate.c:52
 udf_truncate_extents+0x5b0/0xec0 fs/udf/truncate.c:271
 udf_setsize+0x972/0x1000 fs/udf/inode.c:1317
 udf_setattr+0x3a1/0x5a0 fs/udf/file.c:236
 notify_change+0xb36/0xe40 fs/attr.c:552
 do_truncate+0x1a4/0x220 fs/open.c:68
 handle_truncate fs/namei.c:3517 [inline]
 do_open fs/namei.c:3900 [inline]
 path_openat+0x306c/0x3830 fs/namei.c:4055
 do_filp_open+0x1fa/0x410 fs/namei.c:4082
 do_sys_openat2+0x121/0x1c0 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_creat fs/open.c:1530 [inline]
 __se_sys_creat fs/open.c:1524 [inline]
 __x64_sys_creat+0x8f/0xc0 fs/open.c:1524
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f66be98e9a9
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:00007f66bf7f9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007f66bebb5fa0 RCX: 00007f66be98e9a9
RDX: 0000000000000000 RSI: 0000000000000011 RDI: 00002000000002c0
RBP: 00007f66bea10d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f66bebb5fa0 R15: 00007ffc50afd918
 </TASK>
==================================================================
BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x69d/0x7b0 fs/udf/inode.c:2160
Write of size 4 at addr ffff8880408a31d8 by task syz.0.0/5336

CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted 6.16.0-rc7-syzkaller-00140-gec2df4364666 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 udf_write_aext+0x69d/0x7b0 fs/udf/inode.c:2160
 __udf_add_aext+0x2b9/0x6d0 fs/udf/inode.c:2085
 udf_table_free_blocks fs/udf/balloc.c:481 [inline]
 udf_free_blocks+0x1466/0x17f0 fs/udf/balloc.c:677
 extent_trunc+0x35c/0x450 fs/udf/truncate.c:52
 udf_truncate_extents+0x5b0/0xec0 fs/udf/truncate.c:271
 udf_setsize+0x972/0x1000 fs/udf/inode.c:1317
 udf_setattr+0x3a1/0x5a0 fs/udf/file.c:236
 notify_change+0xb36/0xe40 fs/attr.c:552
 do_truncate+0x1a4/0x220 fs/open.c:68
 handle_truncate fs/namei.c:3517 [inline]
 do_open fs/namei.c:3900 [inline]
 path_openat+0x306c/0x3830 fs/namei.c:4055
 do_filp_open+0x1fa/0x410 fs/namei.c:4082
 do_sys_openat2+0x121/0x1c0 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_creat fs/open.c:1530 [inline]
 __se_sys_creat fs/open.c:1524 [inline]
 __x64_sys_creat+0x8f/0xc0 fs/open.c:1524
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f66be98e9a9
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:00007f66bf7f9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007f66bebb5fa0 RCX: 00007f66be98e9a9
RDX: 0000000000000000 RSI: 0000000000000011 RDI: 00002000000002c0
RBP: 00007f66bea10d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f66bebb5fa0 R15: 00007ffc50afd918
 </TASK>

Allocated by task 5336:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
 poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
 kasan_kmalloc include/linux/kasan.h:260 [inline]
 __do_kmalloc_node mm/slub.c:4328 [inline]
 __kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4340
 kmalloc_noprof include/linux/slab.h:909 [inline]
 udf_alloc_i_data fs/udf/inode.c:1661 [inline]
 udf_read_inode fs/udf/inode.c:1473 [inline]
 __udf_iget+0xc66/0x3ae0 fs/udf/inode.c:1967
 udf_iget_special fs/udf/udfdecl.h:147 [inline]
 udf_fill_partdesc_info+0x773/0x1310 fs/udf/super.c:1162
 udf_load_partdesc fs/udf/super.c:1321 [inline]
 udf_process_sequence+0x1133/0x4840 fs/udf/super.c:1837
 udf_load_sequence fs/udf/super.c:1875 [inline]
 udf_check_anchor_block+0x28e/0x550 fs/udf/super.c:1910
 udf_scan_anchors fs/udf/super.c:1964 [inline]
 udf_load_vrs+0x96d/0xf20 fs/udf/super.c:2024
 udf_fill_super+0x5ad/0x17a0 fs/udf/super.c:2192
 get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1681
 vfs_get_tree+0x92/0x2b0 fs/super.c:1804
 do_new_mount+0x24a/0xa40 fs/namespace.c:3902
 do_mount fs/namespace.c:4239 [inline]
 __do_sys_mount fs/namespace.c:4450 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4427
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8880408a3000
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 0 bytes to the right of
 allocated 472-byte region [ffff8880408a3000, ffff8880408a31d8)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x408a2
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000040 ffff88801a441c80 ffffea0001022900 0000000000000004
raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000
head: 04fff00000000040 ffff88801a441c80 ffffea0001022900 0000000000000004
head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000
head: 04fff00000000001 ffffea0001022881 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5272, tgid 5272 (syz-executor), ts 71911176706, free_ts 61662974919
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704
 prep_new_page mm/page_alloc.c:1712 [inline]
 get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
 alloc_slab_page mm/slub.c:2451 [inline]
 allocate_slab+0x8a/0x3b0 mm/slub.c:2619
 new_slab mm/slub.c:2673 [inline]
 ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859
 __slab_alloc mm/slub.c:3949 [inline]
 __slab_alloc_node mm/slub.c:4024 [inline]
 slab_alloc_node mm/slub.c:4185 [inline]
 __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4354
 kmalloc_noprof include/linux/slab.h:905 [inline]
 kzalloc_noprof include/linux/slab.h:1039 [inline]
 inetdev_init+0x7d/0x500 net/ipv4/devinet.c:273
 inetdev_event+0x301/0x15b0 net/ipv4/devinet.c:1591
 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85
 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline]
 call_netdevice_notifiers net/core/dev.c:2282 [inline]
 register_netdevice+0x1608/0x1ae0 net/core/dev.c:11143
 lowpan_newlink+0x3ae/0x5c0 net/ieee802154/6lowpan/core.c:178
 rtnl_newlink_create+0x30d/0xb00 net/core/rtnetlink.c:3823
 __rtnl_newlink net/core/rtnetlink.c:3940 [inline]
 rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4055
 rtnetlink_rcv_msg+0x7cc/0xb70 net/core/rtnetlink.c:6944
 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2552
page last free pid 5270 tgid 5270 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1248 [inline]
 __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706
 __slab_free+0x326/0x400 mm/slub.c:4554
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:250 [inline]
 slab_post_alloc_hook mm/slub.c:4148 [inline]
 slab_alloc_node mm/slub.c:4197 [inline]
 kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4204
 vm_area_dup+0x2b/0x680 mm/vma_init.c:122
 __split_vma+0x1a9/0xa00 mm/vma.c:512
 vms_gather_munmap_vmas+0x2de/0x12b0 mm/vma.c:1354
 __mmap_prepare mm/vma.c:2351 [inline]
 __mmap_region mm/vma.c:2607 [inline]
 mmap_region+0x678/0x1f30 mm/vma.c:2692
 do_mmap+0xc45/0x10d0 mm/mmap.c:561
 vm_mmap_pgoff+0x31b/0x4c0 mm/util.c:579
 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:607
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8880408a3080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880408a3100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880408a3180: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
                                                    ^
 ffff8880408a3200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880408a3280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/27 10:29 upstream ec2df4364666 fb8f743d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
2025/07/26 20:47 upstream 302f88ff3584 fb8f743d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
2025/07/24 10:06 upstream f9af7b5d9349 0c1d6ded .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
2025/07/23 04:56 upstream 89be9a83ccf1 e1dd4f22 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
2025/07/13 13:02 upstream 3f31a806a62e 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
2025/07/11 20:25 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
2025/07/11 12:38 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
2025/07/10 23:38 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Write in udf_write_aext
* Struck through repros no longer work on HEAD.