loop0: detected capacity change from 0 to 2048
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000)
==================================================================
BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2095
Write of size 4 at addr ffff888023664bf0 by task syz-executor957/3538

CPU: 1 PID: 3538 Comm: syz-executor957 Not tainted 6.1.28-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x15f/0x4f0 mm/kasan/report.c:395
 kasan_report+0x136/0x160 mm/kasan/report.c:495
 udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2095
 udf_add_entry+0x17b7/0x3350 fs/udf/namei.c:482
 udf_mkdir+0x1a8/0xaa0 fs/udf/namei.c:681
 vfs_mkdir+0x3b6/0x590 fs/namei.c:4036
 do_mkdirat+0x260/0x520 fs/namei.c:4061
 __do_sys_mkdirat fs/namei.c:4076 [inline]
 __se_sys_mkdirat fs/namei.c:4074 [inline]
 __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4074
 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:0x7f000b2d3bd9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 00 00 90 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:00007fff23e75f18 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f000b2d3bd9
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 00000000ffffff9c
RBP: 00007f000b2931e0 R08: 0000000000000bfc R09: 0000000000000000
R10: 00007fff23e75de0 R11: 0000000000000246 R12: 00007f000b293270
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Allocated by task 1:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383
 kmalloc include/linux/slab.h:553 [inline]
 kzalloc include/linux/slab.h:689 [inline]
 device_private_init drivers/base/core.c:3508 [inline]
 device_add+0xb5/0xfd0 drivers/base/core.c:3558
 device_create_groups_vargs drivers/base/core.c:4342 [inline]
 device_create+0x253/0x2e0 drivers/base/core.c:4384
 mon_bin_add+0xad/0x120 drivers/usb/mon/mon_bin.c:1364
 mon_bus_init+0x169/0x290 drivers/usb/mon/mon_main.c:302
 mon_bus_add drivers/usb/mon/mon_main.c:199 [inline]
 mon_notify+0x10e/0x3f0 drivers/usb/mon/mon_main.c:230
 notifier_call_chain kernel/notifier.c:87 [inline]
 blocking_notifier_call_chain+0x104/0x1b0 kernel/notifier.c:382
 usb_register_bus drivers/usb/core/hcd.c:935 [inline]
 usb_add_hcd+0x48f/0x1250 drivers/usb/core/hcd.c:2877
 vhci_hcd_probe+0x1f0/0x3b0 drivers/usb/usbip/vhci_hcd.c:1376
 platform_probe+0x131/0x1b0 drivers/base/platform.c:1400
 really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:783
 driver_probe_device+0x50/0x420 drivers/base/dd.c:813
 __device_attach_driver+0x2cf/0x510 drivers/base/dd.c:941
 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
 __device_attach+0x359/0x570 drivers/base/dd.c:1013
 bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
 device_add+0xb48/0xfd0 drivers/base/core.c:3664
 platform_device_add+0x46e/0x7d0 drivers/base/platform.c:717
 vhci_hcd_init+0x3e4/0x508 drivers/usb/usbip/vhci_hcd.c:1546
 do_one_initcall+0x265/0x8f0 init/main.c:1303
 do_initcall_level+0x157/0x207 init/main.c:1376
 do_initcalls+0x49/0x86 init/main.c:1392
 kernel_init_freeable+0x473/0x61f init/main.c:1631
 kernel_init+0x19/0x290 init/main.c:1519
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

The buggy address belongs to the object at ffff888023664800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 496 bytes to the right of
 512-byte region [ffff888023664800, ffff888023664a00)

The buggy address belongs to the physical page:
page:ffffea00008d9900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23664
head:ffffea00008d9900 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea00008e8700 dead000000000002 ffff888012441c80
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 1624, tgid 1624 (kworker/u4:4), ts 8104623803, free_ts 0
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533
 prep_new_page mm/page_alloc.c:2540 [inline]
 get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292
 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559
 alloc_slab_page+0x6a/0x150 mm/slub.c:1794
 allocate_slab mm/slub.c:1939 [inline]
 new_slab+0x84/0x2d0 mm/slub.c:1992
 ___slab_alloc+0xa71/0x1080 mm/slub.c:3180
 __slab_alloc mm/slub.c:3279 [inline]
 slab_alloc_node mm/slub.c:3364 [inline]
 __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437
 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045
 kmalloc include/linux/slab.h:553 [inline]
 kzalloc include/linux/slab.h:689 [inline]
 alloc_bprm+0x57/0x700 fs/exec.c:1508
 kernel_execve+0x92/0xa10 fs/exec.c:1967
 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:113
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888023664a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888023664b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888023664b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                             ^
 ffff888023664c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888023664c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================