loop0: rw=0, sector=117, nr_sectors = 1 limit=0 syz.0.15: attempt to access beyond end of device loop0: rw=0, sector=117, nr_sectors = 1 limit=0 ================================================================== BUG: KASAN: slab-out-of-bounds in udf_get_filelongad+0x167/0x1b0 fs/udf/directory.c:526 Read of size 4 at addr ffff888011bc2f30 by task syz.0.15/5631 CPU: 0 UID: 0 PID: 5631 Comm: syz.0.15 Not tainted 6.11.0-syzkaller-ga430d95c5efa-dirty #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 udf_get_filelongad+0x167/0x1b0 fs/udf/directory.c:526 udf_current_aext+0x435/0x9e0 fs/udf/inode.c:2233 udf_next_aext+0x8c/0x4a0 fs/udf/inode.c:2169 udf_extend_file fs/udf/inode.c:675 [inline] udf_setsize+0xa8a/0x1280 fs/udf/inode.c:1263 udf_setattr+0x3c7/0x5d0 fs/udf/file.c:236 notify_change+0xbca/0xe90 fs/attr.c:503 do_truncate fs/open.c:65 [inline] do_ftruncate+0x462/0x580 fs/open.c:181 do_sys_ftruncate fs/open.c:199 [inline] __do_sys_ftruncate fs/open.c:207 [inline] __se_sys_ftruncate fs/open.c:205 [inline] __x64_sys_ftruncate+0x95/0xf0 fs/open.c:205 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5479379eb9 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:00007f547a0e1038 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007f5479515f80 RCX: 00007f5479379eb9 RDX: 0000000000000000 RSI: 0000008002007ffb RDI: 0000000000000005 RBP: 00007f54793e793e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f5479515f80 R15: 00007fff70ff2d48 Allocated by task 5632: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __kmalloc_cache_noprof+0x19c/0x2c0 mm/slub.c:4190 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] alloc_bprm+0x2d6/0xe20 fs/exec.c:1581 do_execveat_common+0x18c/0x6f0 fs/exec.c:1971 do_execve fs/exec.c:2094 [inline] __do_sys_execve fs/exec.c:2170 [inline] __se_sys_execve fs/exec.c:2165 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2165 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5632: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xe0/0x150 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2250 [inline] slab_free mm/slub.c:4474 [inline] kfree+0x149/0x360 mm/slub.c:4595 do_execveat_common+0x388/0x6f0 fs/exec.c:2022 do_execve fs/exec.c:2094 [inline] __do_sys_execve fs/exec.c:2170 [inline] __se_sys_execve fs/exec.c:2165 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2165 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888011bc2c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 304 bytes to the right of allocated 512-byte region [ffff888011bc2c00, ffff888011bc2e00) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11bc2 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000040 ffff88801ac41c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000080008 00000001fdffffff 0000000000000000 head: 00fff00000000040 ffff88801ac41c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000080008 00000001fdffffff 0000000000000000 head: 00fff00000000001 ffffea000046f081 ffffffffffffffff 0000000000000000 head: ffff888000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5451, tgid 5451 (syz-executor), ts 137841735172, free_ts 137580793357 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2319 allocate_slab+0x5a/0x2f0 mm/slub.c:2482 new_slab mm/slub.c:2535 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3721 __slab_alloc+0x58/0xa0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4185 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] mca_alloc net/ipv6/mcast.c:881 [inline] __ipv6_dev_mc_inc+0x429/0xaa0 net/ipv6/mcast.c:937 ipv6_add_dev+0xe12/0x1220 net/ipv6/addrconf.c:471 addrconf_notify+0x6a7/0x1020 net/ipv6/addrconf.c:3655 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] register_netdevice+0x167f/0x1b00 net/core/dev.c:10520 register_netdev+0x3b/0x50 net/core/dev.c:10624 vti6_init_net+0x233/0x2f0 net/ipv6/ip6_vti.c:1155 ops_init+0x31e/0x590 net/core/net_namespace.c:139 page last free pid 5448 tgid 5448 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2619 discard_slab mm/slub.c:2581 [inline] __put_partials+0xeb/0x130 mm/slub.c:3049 put_cpu_partial+0x17c/0x250 mm/slub.c:3124 __slab_free+0x2ea/0x3d0 mm/slub.c:4344 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3989 [inline] slab_alloc_node mm/slub.c:4038 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4045 ptlock_alloc mm/memory.c:6606 [inline] ptlock_init include/linux/mm.h:2949 [inline] pmd_ptlock_init include/linux/mm.h:3053 [inline] pagetable_pmd_ctor include/linux/mm.h:3091 [inline] pmd_alloc_one_noprof include/asm-generic/pgalloc.h:141 [inline] __pmd_alloc+0x110/0x630 mm/memory.c:6096 pmd_alloc include/linux/mm.h:2840 [inline] __handle_mm_fault mm/memory.c:5641 [inline] handle_mm_fault+0xf76/0x1bb0 mm/memory.c:5849 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 Memory state around the buggy address: ffff888011bc2e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011bc2e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011bc2f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888011bc2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011bc3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================