loop0: detected capacity change from 0 to 5456 UDF-fs: error (device loop0): udf_process_sequence: Primary Volume Descriptor not found! UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000) ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x8bc/0x8f0 fs/udf/inode.c:2097 Write of size 4 at addr ffff88802a8783f8 by task syz-executor367/5239 CPU: 0 PID: 5239 Comm: syz-executor367 Not tainted 6.1.0-rc3-next-20221104-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+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+0x277/0x2f0 fs/namei.c:4060 __do_sys_mkdir fs/namei.c:4080 [inline] __se_sys_mkdir fs/namei.c:4078 [inline] __x64_sys_mkdir+0xf2/0x140 fs/namei.c:4078 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:0x7fba00476579 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:00007ffe871a7a38 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fba00476579 RDX: 00007fba004347e3 RSI: 0000000000000000 RDI: 0000000020000180 RBP: 00007fba00435ab0 R08: 00005555562dc2c0 R09: 0000000000000000 R10: 00007ffe871a7900 R11: 0000000000000246 R12: 00007fba00435b40 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4599: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 kasan_set_track+0x21/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:376 [inline] ____kasan_kmalloc mm/kasan/common.c:335 [inline] __kasan_kmalloc+0xa1/0xb0 mm/kasan/common.c:385 kmalloc include/linux/slab.h:587 [inline] kzalloc include/linux/slab.h:723 [inline] kernfs_fop_open+0x31a/0xec0 fs/kernfs/file.c:666 do_dentry_open+0x6cc/0x13f0 fs/open.c:882 do_open fs/namei.c:3557 [inline] path_openat+0x1bbc/0x2a50 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 4599: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 kasan_set_track+0x21/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2a/0x40 mm/kasan/generic.c:511 ____kasan_slab_free mm/kasan/common.c:241 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:205 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1750 slab_free mm/slub.c:3653 [inline] __kmem_cache_free+0xab/0x3b0 mm/slub.c:3666 kernfs_fop_release+0x128/0x1e0 fs/kernfs/file.c:804 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0x16b/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802a878000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 504 bytes to the right of 512-byte region [ffff88802a878000, ffff88802a878200) The buggy address belongs to the physical page: page:ffffea0000aa1e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2a878 head:ffffea0000aa1e00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888011841c80 dead000000000100 dead000000000122 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 4559, tgid 4559 (cryptomgr_probe), ts 14074413945, free_ts 11837839065 prep_new_page mm/page_alloc.c:2554 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4303 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5562 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x207/0x2c0 mm/slub.c:1941 new_slab mm/slub.c:1994 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3172 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3271 slab_alloc_node mm/slub.c:3356 [inline] __kmem_cache_alloc_node+0x191/0x3e0 mm/slub.c:3429 kmalloc_trace+0x22/0x60 mm/slab_common.c:1046 kmalloc include/linux/slab.h:587 [inline] kzalloc include/linux/slab.h:723 [inline] cryptomgr_schedule_test crypto/algboss.c:205 [inline] cryptomgr_notify+0x4e6/0xc90 crypto/algboss.c:240 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 blocking_notifier_call_chain kernel/notifier.c:382 [inline] blocking_notifier_call_chain+0x67/0x90 kernel/notifier.c:370 crypto_probing_notify crypto/api.c:306 [inline] crypto_wait_for_test+0x49/0x110 crypto/api.c:169 crypto_register_instance+0x3cf/0x4c0 crypto/algapi.c:669 akcipher_register_instance+0x9b/0xf0 crypto/akcipher.c:161 pkcs1pad_create+0x5c9/0x790 crypto/rsa-pkcs1pad.c:681 cryptomgr_probe+0x79/0x200 crypto/algboss.c:61 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1461 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1511 free_unref_page_prepare mm/page_alloc.c:3402 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3498 __vunmap+0x85d/0xd30 mm/vmalloc.c:2727 free_work+0x58/0x70 mm/vmalloc.c:100 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88802a878280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802a878300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802a878380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802a878400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802a878480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================