================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x780/0x860 fs/udf/inode.c:2065 Write of size 4 at addr ffff8880affc6a30 by task syz-executor.2/28557 CPU: 0 PID: 28557 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_store_n_noabort+0x8b/0xa0 mm/kasan/report.c:449 udf_write_aext+0x780/0x860 fs/udf/inode.c:2065 udf_add_entry+0xdab/0x2a20 fs/udf/namei.c:496 udf_mkdir+0x145/0x650 fs/udf/namei.c:693 vfs_mkdir+0x508/0x7a0 fs/namei.c:3819 do_mkdirat+0x262/0x2d0 fs/namei.c:3842 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f43f42620c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f43f27d4168 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f43f4381f80 RCX: 00007f43f42620c9 RDX: 0000000000000000 RSI: 0000000020000540 RDI: 0000000000000008 RBP: 00007f43f42bdae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdc885f4cf R14: 00007f43f27d4300 R15: 0000000000022000 Allocated by task 28107: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] sctp_endpoint_new+0x7a/0xd50 net/sctp/endpointola.c:192 sctp_init_sock+0xb78/0x1010 net/sctp/socket.c:4779 inet6_create net/ipv6/af_inet6.c:255 [inline] inet6_create+0x9bf/0xf70 net/ipv6/af_inet6.c:110 __sock_create+0x3d8/0x740 net/socket.c:1365 inet_ctl_sock_create+0x88/0x1d0 net/ipv4/af_inet.c:1605 sctp_ctl_sock_init net/sctp/protocol.c:848 [inline] sctp_ctrlsock_init+0x3c/0xd0 net/sctp/protocol.c:1368 ops_init+0xb3/0x410 net/core/net_namespace.c:129 setup_net+0x2c2/0x720 net/core/net_namespace.c:316 copy_net_ns+0x1f7/0x340 net/core/net_namespace.c:439 create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x36c/0x9a0 kernel/fork.c:2542 __do_sys_unshare kernel/fork.c:2610 [inline] __se_sys_unshare kernel/fork.c:2608 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:2608 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 23: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 nf_conntrack_standalone_fini_sysctl net/netfilter/nf_conntrack_standalone.c:621 [inline] nf_conntrack_pernet_exit+0x95/0x160 net/netfilter/nf_conntrack_standalone.c:667 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:554 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880affc67c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 112 bytes to the right of 512-byte region [ffff8880affc67c0, ffff8880affc69c0) The buggy address belongs to the page: page:ffffea0002bff180 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff8880affc6cc0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002913ac8 ffffea0002799e08 ffff88813bff0940 raw: ffff8880affc6cc0 ffff8880affc6040 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880affc6900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880affc6980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880affc6a00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff8880affc6a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880affc6b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================