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 ffff888011852f30 by task syz.0.15/5600 CPU: 0 UID: 0 PID: 5600 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:0x7f61fbd79eb9 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:00007f61fcad5038 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007f61fbf15f80 RCX: 00007f61fbd79eb9 RDX: 0000000000000000 RSI: 0000008002007ffb RDI: 0000000000000005 RBP: 00007f61fbde793e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f61fbf15f80 R15: 00007ffd222559c8 Allocated by task 5512: 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] rpc_mkpipe_data+0x5a/0x390 net/sunrpc/rpc_pipe.c:568 nfs4blocklayout_net_init+0x85/0x1e0 fs/nfs/blocklayout/rpc_pipefs.c:239 ops_init+0x31e/0x590 net/core/net_namespace.c:139 setup_net+0x287/0x9e0 net/core/net_namespace.c:356 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:494 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228 ksys_unshare+0x619/0xc10 kernel/fork.c:3309 __do_sys_unshare kernel/fork.c:3380 [inline] __se_sys_unshare kernel/fork.c:3378 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3378 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 12: 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 nfs4blocklayout_net_exit+0xdb/0x130 fs/nfs/blocklayout/rpc_pipefs.c:256 ops_exit_list net/core/net_namespace.c:173 [inline] cleanup_net+0x802/0xcc0 net/core/net_namespace.c:626 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 The buggy address belongs to the object at ffff888011852c00 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 [ffff888011852c00, ffff888011852e00) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11852 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000040 ffff88801ac41c80 ffffea00006abf00 dead000000000003 raw: 0000000000000000 0000000000080008 00000001fdffffff 0000000000000000 head: 00fff00000000040 ffff88801ac41c80 ffffea00006abf00 dead000000000003 head: 0000000000000000 0000000000080008 00000001fdffffff 0000000000000000 head: 00fff00000000001 ffffea0000461481 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 5143, tgid 5143 (syz-executor), ts 90030395292, free_ts 89779664543 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] device_private_init drivers/base/core.c:3527 [inline] device_add+0xc1/0xbf0 drivers/base/core.c:3578 netdev_register_kobject+0x17e/0x310 net/core/net-sysfs.c:2139 register_netdevice+0x12c5/0x1b00 net/core/dev.c:10487 __ip_tunnel_create+0x2b4/0x380 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x21c/0x720 net/ipv4/ip_tunnel.c:1160 ops_init+0x31e/0x590 net/core/net_namespace.c:139 setup_net+0x287/0x9e0 net/core/net_namespace.c:356 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:494 page last free pid 5136 tgid 5136 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+0x16a1/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: ffff888011852e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011852e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011852f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888011852f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011853000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================