loop0: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x8c0/0x8f0 fs/udf/inode.c:2097 Write of size 4 at addr ffff8880292fabf8 by task syz-executor946/5296 CPU: 0 PID: 5296 Comm: syz-executor946 Not tainted 6.1.0-rc5-next-20221116-syzkaller #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+0xd1/0x138 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+0xbf/0x1f0 mm/kasan/report.c:464 udf_write_aext+0x8c0/0x8f0 fs/udf/inode.c:2097 udf_add_entry+0xd03/0x2ac0 fs/udf/namei.c:482 udf_mkdir+0x149/0x650 fs/udf/namei.c:681 vfs_mkdir+0x48d/0x740 fs/namei.c:4035 do_mkdirat+0x27b/0x2f0 fs/namei.c:4060 __do_sys_mkdir fs/namei.c:4080 [inline] __se_sys_mkdir fs/namei.c:4078 [inline] __x64_sys_mkdir+0xf6/0x140 fs/namei.c:4078 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f85e238b479 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:00007ffc07b2ce68 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f85e238b479 RDX: 00007f85e23496e3 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f85e234a9b0 R08: 00007ffc07b2cd50 R09: 0000000000000000 R10: 00007ffc07b2cd30 R11: 0000000000000246 R12: 00007f85e234aa40 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4672: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:376 [inline] ____kasan_kmalloc mm/kasan/common.c:335 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:385 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc_node_track_caller+0x5b/0xc0 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:438 [inline] __alloc_skb+0xe9/0x310 net/core/skbuff.c:511 alloc_skb include/linux/skbuff.h:1269 [inline] alloc_uevent_skb+0x7b/0x210 lib/kobject_uevent.c:290 uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline] kobject_uevent_env+0xc22/0x1620 lib/kobject_uevent.c:593 kobject_synth_uevent+0x705/0x850 lib/kobject_uevent.c:208 uevent_store+0x24/0x50 drivers/base/core.c:2510 dev_attr_store+0x54/0x80 drivers/base/core.c:2212 sysfs_kf_write+0x114/0x170 fs/sysfs/file.c:136 kernfs_fop_write_iter+0x3fc/0x610 fs/kernfs/file.c:330 call_write_iter include/linux/fs.h:2160 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0xa45/0xe40 fs/read_write.c:584 ksys_write+0x12b/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880292fa800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 504 bytes to the right of 512-byte region [ffff8880292fa800, ffff8880292faa00) The buggy address belongs to the physical page: page:ffffea0000a4be00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x292f8 head:ffffea0000a4be00 order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080100010 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 3793, tgid 3793 (kworker/u4:3), ts 12489625914, free_ts 11821666527 prep_new_page mm/page_alloc.c:2561 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4310 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5569 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1833 [inline] allocate_slab+0x25e/0x350 mm/slub.c:1980 new_slab mm/slub.c:2033 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3211 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3310 slab_alloc_node mm/slub.c:3395 [inline] __kmem_cache_alloc_node+0x1a9/0x430 mm/slub.c:3472 kmalloc_trace+0x26/0x60 mm/slab_common.c:1049 kmalloc include/linux/slab.h:575 [inline] kzalloc include/linux/slab.h:711 [inline] alloc_bprm+0x51/0x900 fs/exec.c:1510 kernel_execve+0xaf/0x500 fs/exec.c:1981 call_usermodehelper_exec_async+0x2e7/0x580 kernel/umh.c:113 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1468 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1518 free_unref_page_prepare mm/page_alloc.c:3409 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3505 __vunmap+0x85d/0xd30 mm/vmalloc.c:2727 free_work+0x5c/0x80 mm/vmalloc.c:100 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff8880292faa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880292fab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880292fab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880292fac00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880292fac80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================