UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2020/09/19 18:44 (1000) ================================================================== BUG: KASAN: use-after-free in udf_get_fileident+0x233/0x250 fs/udf/directory.c:176 Read of size 2 at addr ffff8880a086273c by task syz-executor347/8084 CPU: 1 PID: 8084 Comm: syz-executor347 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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 ksys_getdents64+0x175/0x2b0 fs/readdir.c:357 __do_sys_getdents64 fs/readdir.c:376 [inline] __se_sys_getdents64 fs/readdir.c:373 [inline] __x64_sys_getdents64+0x6f/0xb0 fs/readdir.c:373 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f9deb5dd389 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:00007ffd82ec5758 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f9deb5dd389 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f9deb59cc20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9deb59ccb0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8070: __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 8068: __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 net/core/skbuff.c:654 [inline] kfree_skb_partial+0x7e/0xa0 net/core/skbuff.c:4857 tcp_rcv_established+0x1b89/0x1ef0 net/ipv4/tcp_input.c:5649 tcp_v4_do_rcv+0x5d6/0x870 net/ipv4/tcp_ipv4.c:1547 sk_backlog_rcv include/net/sock.h:952 [inline] __release_sock+0x134/0x3a0 net/core/sock.c:2362 release_sock+0x54/0x1b0 net/core/sock.c:2901 tcp_recvmsg+0xa94/0x2a90 net/ipv4/tcp.c:2179 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 ffff8880a0862580 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 444 bytes inside of 512-byte region [ffff8880a0862580, ffff8880a0862780) The buggy address belongs to the page: page:ffffea0002821880 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002aa7e08 ffffea000265aac8 ffff88813bff0940 raw: 0000000000000000 ffff8880a0862080 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a0862600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0862680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a0862700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a0862780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a0862800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================