UDF-fs: Scanning with blocksize 2048 failed UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x62d/0x7e0 fs/udf/inode.c:2090 Write of size 4 at addr ffff8880769ddff0 by task syz-executor309/5071 CPU: 1 PID: 5071 Comm: syz-executor309 Not tainted 6.1.0-syzkaller-13781-gaeba12b26c79 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x1f0 mm/kasan/report.c:417 kasan_report+0xcd/0x100 mm/kasan/report.c:517 udf_write_aext+0x62d/0x7e0 fs/udf/inode.c:2090 udf_add_entry+0x1712/0x3300 fs/udf/namei.c:482 udf_mkdir+0x13c/0x980 fs/udf/namei.c:681 vfs_mkdir+0x3b3/0x590 fs/namei.c:4036 do_mkdirat+0x25b/0x530 fs/namei.c:4061 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6792b358a7 Code: ff ff ff ff c3 66 0f 1f 44 00 00 48 c7 c0 c0 ff ff ff 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 b8 53 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd31762838 EFLAGS: 00000286 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 0000555555f2f2c0 RCX: 00007f6792b358a7 RDX: 0000000000008000 RSI: 00000000000001ff RDI: 0000000020000000 RBP: 00007ffd317628d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000286 R12: 00000000ffffffff R13: 0000000020000000 R14: 0000000020000040 R15: 0000000000000000 Allocated by task 5071: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:580 [inline] tomoyo_print_header security/tomoyo/audit.c:156 [inline] tomoyo_init_log+0x16a/0x1f80 security/tomoyo/audit.c:255 tomoyo_supervisor+0x38d/0x14f0 security/tomoyo/common.c:2088 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x521/0x780 security/tomoyo/file.c:734 tomoyo_path_mkdir+0xe3/0x120 security/tomoyo/tomoyo.c:178 security_path_mkdir+0xd5/0x160 security/security.c:1188 do_mkdirat+0x1aa/0x530 fs/namei.c:4056 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5071: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:518 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0x71/0x110 mm/slub.c:3800 tomoyo_init_log+0x1be7/0x1f80 security/tomoyo/audit.c:294 tomoyo_supervisor+0x38d/0x14f0 security/tomoyo/common.c:2088 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x521/0x780 security/tomoyo/file.c:734 tomoyo_path_mkdir+0xe3/0x120 security/tomoyo/tomoyo.c:178 security_path_mkdir+0xd5/0x160 security/security.c:1188 do_mkdirat+0x1aa/0x530 fs/namei.c:4056 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880769dc000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 4080 bytes to the right of 4096-byte region [ffff8880769dc000, ffff8880769dd000) The buggy address belongs to the physical page: page:ffffea0001da7600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x769d8 head:ffffea0001da7600 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012842140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5071, tgid 5071 (syz-executor309), ts 52107122119, free_ts 52040474742 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 alloc_slab_page+0xbd/0x190 mm/slub.c:1851 allocate_slab+0x5e/0x3c0 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0x782/0xe20 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x25b/0x340 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc+0x9e/0x190 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] tomoyo_realpath_from_path+0xcd/0x5f0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x1e3/0x780 security/tomoyo/file.c:723 security_file_ioctl+0x55/0xb0 security/security.c:1624 __do_sys_ioctl fs/ioctl.c:864 [inline] __se_sys_ioctl+0x48/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x751/0x780 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x19/0x4c0 mm/page_alloc.c:3464 page_to_skb+0x661/0xb80 drivers/net/virtio_net.c:558 receive_mergeable+0x353/0x26b0 drivers/net/virtio_net.c:1126 receive_buf+0x152/0x1d40 drivers/net/virtio_net.c:1265 virtnet_receive drivers/net/virtio_net.c:1560 [inline] virtnet_poll+0x64b/0x1280 drivers/net/virtio_net.c:1678 __napi_poll+0xbe/0x4b0 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0x75c/0x10d0 net/core/dev.c:6663 __do_softirq+0x277/0x738 kernel/softirq.c:571 Memory state around the buggy address: ffff8880769dde80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880769ddf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880769ddf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880769de000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880769de080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================