loop0: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x8bc/0x8f0 fs/udf/inode.c:2097 Write of size 4 at addr ffff888022e037f8 by task syz-executor123/3602 CPU: 0 PID: 3602 Comm: syz-executor123 Not tainted 6.1.0-rc1-next-20221021-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:253 [inline] print_report+0x15e/0x45d mm/kasan/report.c:364 kasan_report+0xbb/0x1f0 mm/kasan/report.c:464 udf_write_aext+0x8bc/0x8f0 fs/udf/inode.c:2097 udf_add_entry+0xd03/0x2ac0 fs/udf/namei.c:482 udf_mkdir+0x145/0x650 fs/udf/namei.c:681 vfs_mkdir+0x489/0x740 fs/namei.c:4035 do_mkdirat+0x28c/0x310 fs/namei.c:4060 __do_sys_mkdirat fs/namei.c:4075 [inline] __se_sys_mkdirat fs/namei.c:4073 [inline] __x64_sys_mkdirat+0x115/0x170 fs/namei.c:4073 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f099f51d509 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd1b710788 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f099f51d509 RDX: 00000000000001ff RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00007f099f4dca40 R08: 00007ffd1b710660 R09: 0000000000000000 R10: 00007ffd1b710650 R11: 0000000000000246 R12: 00007f099f4dcad0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3602: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 __kasan_unpoison_range-0xf/0x10 ____kasan_slab_free-0xf/0x1c0 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0x54/0xc0 mm/slab_common.c:968 kmalloc include/linux/slab.h:587 [inline] kzalloc include/linux/slab.h:718 [inline] tomoyo_init_log+0x127e/0x1ec0 security/tomoyo/audit.c:275 tomoyo_supervisor+0x350/0xf10 security/tomoyo/common.c:2088 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x270/0x3a0 security/tomoyo/file.c:573 tomoyo_check_open_permission+0x330/0x3a0 security/tomoyo/file.c:780 tomoyo_file_open security/tomoyo/tomoyo.c:332 [inline] tomoyo_file_open+0x9d/0xc0 security/tomoyo/tomoyo.c:327 security_file_open+0x45/0xb0 security/security.c:1649 do_dentry_open+0x575/0x13f0 fs/open.c:869 do_open fs/namei.c:3557 [inline] path_openat+0x1bf0/0x2850 fs/namei.c:3713 do_filp_open+0x1b6/0x400 fs/namei.c:3740 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 3602: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 __kasan_unpoison_range-0xf/0x10 kasan_save_free_info+0x2a/0x40 mm/kasan/generic.c:511 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1750 slab_free mm/slub.c:3666 [inline] __kmem_cache_free+0xab/0x3b0 mm/slub.c:3679 tomoyo_supervisor+0x371/0xf10 security/tomoyo/common.c:2140 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x270/0x3a0 security/tomoyo/file.c:573 tomoyo_check_open_permission+0x330/0x3a0 security/tomoyo/file.c:780 tomoyo_file_open security/tomoyo/tomoyo.c:332 [inline] tomoyo_file_open+0x9d/0xc0 security/tomoyo/tomoyo.c:327 security_file_open+0x45/0xb0 security/security.c:1649 do_dentry_open+0x575/0x13f0 fs/open.c:869 do_open fs/namei.c:3557 [inline] path_openat+0x1bf0/0x2850 fs/namei.c:3713 do_filp_open+0x1b6/0x400 fs/namei.c:3740 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888022e03400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 504 bytes to the right of 512-byte region [ffff888022e03400, ffff888022e03600) The buggy address belongs to the physical page: page:ffffea00008b8000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xdead000000000100 pfn:0x22e00 head:ffffea00008b8000 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888011841c80 dead000080100010 0000000000000000 raw: dead000000000100 dead000000000122 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 10197045669, free_ts 0 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4287 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5546 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2118 alloc_pages+0x22f/0x270 mm/mempolicy.c:2280 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x213/0x300 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3185 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3284 slab_alloc_node mm/slub.c:3369 [inline] __kmem_cache_alloc_node+0x191/0x3e0 mm/slub.c:3442 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node+0x47/0xc0 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:608 [inline] kvmalloc_node+0x3f/0x1b0 mm/util.c:581 kvmalloc include/linux/slab.h:735 [inline] kvzalloc include/linux/slab.h:743 [inline] v4l2_ctrl_new+0x662/0x1c90 drivers/media/v4l2-core/v4l2-ctrls-core.c:1664 v4l2_ctrl_new_std+0x196/0x260 drivers/media/v4l2-core/v4l2-ctrls-core.c:1801 vivid_create_controls+0x22a8/0x37d0 drivers/media/test-drivers/vivid/vivid-ctrls.c:1819 vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1840 [inline] vivid_probe.cold+0x3f86/0x8586 drivers/media/test-drivers/vivid/vivid-core.c:2011 platform_probe+0xfc/0x1f0 drivers/base/platform.c:1400 call_driver_probe drivers/base/dd.c:560 [inline] really_probe+0x249/0xb90 drivers/base/dd.c:639 page_owner free stack trace missing Memory state around the buggy address: ffff888022e03680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888022e03700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888022e03780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888022e03800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888022e03880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================