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 ffff88803c903730 by task syz.0.15/5591 CPU: 0 UID: 0 PID: 5591 Comm: syz.0.15 Not tainted 6.11.0-syzkaller-gdaa394f0f9d3-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:0x7f48f3d79eb9 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:00007f48f4b01038 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007f48f3f15f80 RCX: 00007f48f3d79eb9 RDX: 0000000000000000 RSI: 0000008002007ffb RDI: 0000000000000005 RBP: 00007f48f3de793e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f48f3f15f80 R15: 00007ffc25791898 Allocated by task 5552: 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] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_noprof+0x1fc/0x400 mm/slub.c:4171 kmalloc_noprof include/linux/slab.h:694 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3761 ip6_route_add+0x28/0x160 net/ipv6/route.c:3853 addrconf_add_mroute net/ipv6/addrconf.c:2550 [inline] addrconf_add_dev+0x35b/0x540 net/ipv6/addrconf.c:2568 inet6_addr_add+0x258/0xb00 net/ipv6/addrconf.c:3026 inet6_rtm_newaddr+0x8a3/0xc90 net/ipv6/addrconf.c:5050 rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6646 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 __sys_sendto+0x398/0x4f0 net/socket.c:2210 __do_sys_sendto net/socket.c:2222 [inline] __se_sys_sendto net/socket.c:2218 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2218 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 79: 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 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2843 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:3106 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:3210 call_rcu_hurry include/linux/rcupdate.h:113 [inline] fib6_info_release include/net/ip6_fib.h:343 [inline] ip6_route_info_create+0xa33/0x12b0 net/ipv6/route.c:3839 ip6_route_add+0x28/0x160 net/ipv6/route.c:3853 addrconf_add_mroute net/ipv6/addrconf.c:2550 [inline] addrconf_add_dev+0x35b/0x540 net/ipv6/addrconf.c:2568 inet6_addr_add+0x258/0xb00 net/ipv6/addrconf.c:3026 inet6_rtm_newaddr+0x8a3/0xc90 net/ipv6/addrconf.c:5050 rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6646 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 __sys_sendto+0x398/0x4f0 net/socket.c:2210 __do_sys_sendto net/socket.c:2222 [inline] __se_sys_sendto net/socket.c:2218 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2218 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 ffff88803c903400 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 [ffff88803c903400, ffff88803c903600) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3c902 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 04fff00000000040 ffff88801ac41c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000080008 00000001fdffffff 0000000000000000 head: 04fff00000000040 ffff88801ac41c80 0000000000000000 dead000000000001 head: 0000000000000000 0000000000080008 00000001fdffffff 0000000000000000 head: 04fff00000000001 ffffea0000f24081 ffffffffffffffff 0000000000000000 head: 0000000000000002 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 1039, tgid 1039 (kworker/u4:9), ts 108944966197, free_ts 106956634167 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 addrconf_join_solict net/ipv6/addrconf.c:2241 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4104 [inline] addrconf_dad_work+0x448/0x16f0 net/ipv6/addrconf.c:4229 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x870/0xd30 kernel/workqueue.c:3393 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 5140 tgid 5140 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 vfree+0x186/0x2e0 mm/vmalloc.c:3367 kcov_put kernel/kcov.c:438 [inline] kcov_close+0x28/0x50 kernel/kcov.c:534 __fput+0x23f/0x880 fs/file_table.c:431 task_work_run+0x24f/0x310 kernel/task_work.c:228 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa2f/0x27f0 kernel/exit.c:882 do_group_exit+0x207/0x2c0 kernel/exit.c:1031 get_signal+0x16a3/0x1740 kernel/signal.c:2917 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88803c903600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803c903680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803c903700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803c903780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803c903800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================