================================================================== BUG: KASAN: use-after-free in skb_release_data+0x4ae/0x850 net/core/skbuff.c:929 Read of size 1 at addr ffff88803641dec2 by task syz-fuzzer/5012 CPU: 0 PID: 5012 Comm: syz-fuzzer Not tainted 6.5.0-rc3-syzkaller-00018-g0b5547c51827 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 skb_release_data+0x4ae/0x850 net/core/skbuff.c:929 skb_release_all net/core/skbuff.c:1002 [inline] __kfree_skb net/core/skbuff.c:1016 [inline] skb_attempt_defer_free+0x395/0x530 net/core/skbuff.c:6739 tcp_eat_recv_skb net/ipv4/tcp.c:1504 [inline] tcp_recvmsg_locked+0x1579/0x25d0 net/ipv4/tcp.c:2520 tcp_recvmsg+0x25c/0x920 net/ipv4/tcp.c:2566 inet_recvmsg+0x13f/0x250 net/ipv4/af_inet.c:862 sock_recvmsg_nosec net/socket.c:1020 [inline] sock_recvmsg net/socket.c:1041 [inline] sock_read_iter+0x3ab/0x500 net/socket.c:1107 call_read_iter include/linux/fs.h:1865 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x795/0xb00 fs/read_write.c:470 ksys_read+0x1a0/0x2c0 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x403ace Code: 48 89 6c 24 38 48 8d 6c 24 38 e8 0d 00 00 00 48 8b 6c 24 38 48 83 c4 40 c3 cc cc cc 49 89 f2 48 89 fa 48 89 ce 48 89 df 0f 05 <48> 3d 01 f0 ff ff 76 15 48 f7 d8 48 89 c1 48 c7 c0 ff ff ff ff 48 RSP: 002b:000000c00b9b9800 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000403ace RDX: 0000000000001000 RSI: 000000c00050b000 RDI: 0000000000000003 RBP: 000000c00b9b9840 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000000c00b9b9980 R13: 0000000000000000 R14: 000000c000007a00 R15: 0000000000000010 The buggy address belongs to the physical page: page:ffffea0000d90740 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3641d flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 ffffea0000d90748 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 6005, tgid 5006 (syz-fuzzer), ts 523689215624, free_ts 575464587964 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x31e8/0x3370 mm/page_alloc.c:3221 __alloc_pages+0x255/0x670 mm/page_alloc.c:4477 skb_page_frag_refill+0x158/0x2f0 net/core/sock.c:2907 add_recvbuf_mergeable drivers/net/virtio_net.c:1742 [inline] try_fill_recv+0x550/0x1880 drivers/net/virtio_net.c:1786 virtnet_receive drivers/net/virtio_net.c:1900 [inline] virtnet_poll+0x8fb/0x1470 drivers/net/virtio_net.c:1960 __napi_poll+0xc7/0x470 net/core/dev.c:6460 napi_poll net/core/dev.c:6527 [inline] net_rx_action+0x78b/0x1010 net/core/dev.c:6660 __do_softirq+0x2ab/0x908 kernel/softirq.c:553 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2348 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2443 napi_frag_unref include/linux/skbuff.h:3435 [inline] skb_release_data+0x446/0x850 net/core/skbuff.c:930 skb_release_all net/core/skbuff.c:1002 [inline] __kfree_skb net/core/skbuff.c:1016 [inline] skb_attempt_defer_free+0x395/0x530 net/core/skbuff.c:6739 tcp_eat_recv_skb net/ipv4/tcp.c:1504 [inline] tcp_recvmsg_locked+0x1579/0x25d0 net/ipv4/tcp.c:2520 tcp_recvmsg+0x25c/0x920 net/ipv4/tcp.c:2566 inet_recvmsg+0x13f/0x250 net/ipv4/af_inet.c:862 sock_recvmsg_nosec net/socket.c:1020 [inline] sock_recvmsg net/socket.c:1041 [inline] sock_read_iter+0x3ab/0x500 net/socket.c:1107 call_read_iter include/linux/fs.h:1865 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x795/0xb00 fs/read_write.c:470 ksys_read+0x1a0/0x2c0 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88803641dd80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803641de00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88803641de80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88803641df00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803641df80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================