================================================================== BUG: KASAN: use-after-free in udf_get_fileident+0x233/0x250 fs/udf/directory.c:176 Read of size 2 at addr ffff8880974a9c64 by task syz-executor.4/17535 CPU: 1 PID: 17535 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 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_load_n_noabort+0x8b/0xa0 mm/kasan/report.c:443 udf_get_fileident+0x233/0x250 fs/udf/directory.c:176 udf_fileident_read+0x550/0x1930 fs/udf/directory.c:37 udf_readdir+0x559/0x1350 fs/udf/dir.c:129 iterate_dir+0x473/0x5c0 fs/readdir.c:51 __do_sys_getdents fs/readdir.c:271 [inline] __se_sys_getdents+0x175/0x2d0 fs/readdir.c:252 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7feeb16c75f9 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007feeb003a168 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007feeb17e7f80 RCX: 00007feeb16c75f9 RDX: 00000000000000c6 RSI: 0000000020001a80 RDI: 0000000000000003 RBP: 00007feeb17227b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd234c968f R14: 00007feeb003a300 R15: 0000000000022000 Allocated by task 8109: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0xae/0x560 net/core/skbuff.c:205 __napi_alloc_skb+0x74/0x300 net/core/skbuff.c:478 napi_alloc_skb include/linux/skbuff.h:2724 [inline] page_to_skb+0x76/0xa70 drivers/net/virtio_net.c:396 receive_mergeable drivers/net/virtio_net.c:951 [inline] receive_buf+0x2ab4/0x6780 drivers/net/virtio_net.c:1061 virtnet_receive drivers/net/virtio_net.c:1352 [inline] virtnet_poll+0x568/0xe00 drivers/net/virtio_net.c:1457 napi_poll net/core/dev.c:6280 [inline] net_rx_action+0x4ac/0xfb0 net/core/dev.c:6346 __do_softirq+0x265/0x980 kernel/softirq.c:292 Freed by task 8109: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x6de/0x920 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb+0x46/0x60 net/core/skbuff.c:654 sk_eat_skb include/net/sock.h:2430 [inline] tcp_recvmsg+0x157c/0x2a90 net/ipv4/tcp.c:2161 inet_recvmsg+0x124/0x5c0 net/ipv4/af_inet.c:830 sock_recvmsg_nosec net/socket.c:859 [inline] sock_recvmsg net/socket.c:866 [inline] sock_recvmsg net/socket.c:862 [inline] sock_read_iter+0x339/0x470 net/socket.c:944 call_read_iter include/linux/fs.h:1815 [inline] new_sync_read fs/read_write.c:406 [inline] __vfs_read+0x518/0x750 fs/read_write.c:418 vfs_read+0x194/0x3c0 fs/read_write.c:452 ksys_read+0x12b/0x2a0 fs/read_write.c:579 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880974a9a80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 484 bytes inside of 512-byte region [ffff8880974a9a80, ffff8880974a9c80) The buggy address belongs to the page: page:ffffea00025d2a40 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff8880974a9a80 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002706a88 ffffea0002aac948 ffff88813bff0940 raw: ffff8880974a9a80 ffff8880974a9080 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880974a9b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880974a9b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880974a9c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880974a9c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880974a9d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================