EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue ================================================================== BUG: KASAN: use-after-free in udf_get_fileident+0x1ea/0x200 fs/udf/directory.c:178 Read of size 2 at addr ffff8880984783b4 by task syz-executor.1/9620 CPU: 0 PID: 9620 Comm: syz-executor.1 Not tainted 4.14.304-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load_n_noabort+0x6b/0x80 mm/kasan/report.c:440 udf_get_fileident+0x1ea/0x200 fs/udf/directory.c:178 udf_fileident_read+0x4b9/0x1840 fs/udf/directory.c:36 audit: type=1804 audit(1675122057.008:4): pid=9609 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2818662283/syzkaller.W09LaH/4/file0/bus" dev="loop4" ino=18 res=1 udf_readdir+0x4d0/0x11f0 fs/udf/dir.c:129 iterate_dir+0x1a0/0x5e0 fs/readdir.c:52 SYSC_getdents fs/readdir.c:272 [inline] SyS_getdents+0x125/0x240 fs/readdir.c:253 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7fe3a0b880c9 RSP: 002b:00007fe39f0fa168 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007fe3a0ca7f80 RCX: 00007fe3a0b880c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fe3a0be3ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe9b7e5d5f R14: 00007fe39f0fa300 R15: 0000000000022000 Allocated by task 9612: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3696 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1168 [inline] netlink_sendmsg+0x91e/0xbc0 net/netlink/af_netlink.c:1868 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 1: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] consume_skb+0xe0/0x380 net/core/skbuff.c:714 skb_free_datagram+0x16/0xe0 net/core/datagram.c:331 netlink_recvmsg+0x535/0xce0 net/netlink/af_netlink.c:1971 sock_recvmsg_nosec net/socket.c:819 [inline] sock_recvmsg net/socket.c:826 [inline] sock_recvmsg+0xc0/0x100 net/socket.c:822 ___sys_recvmsg+0x20b/0x4d0 net/socket.c:2221 __sys_recvmsg+0xa0/0x120 net/socket.c:2266 SYSC_recvmsg net/socket.c:2278 [inline] SyS_recvmsg+0x27/0x40 net/socket.c:2273 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff888098478000 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 948 bytes inside of 1024-byte region [ffff888098478000, ffff888098478400) The buggy address belongs to the page: page:ffffea0002611e00 count:1 mapcount:0 mapping:ffff888098478000 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff888098478000 0000000000000000 0000000100000007 raw: ffffea0002641020 ffffea000261eaa0 ffff88813fe74ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888098478280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888098478300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888098478380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888098478400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888098478480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================