================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:147 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:1076 [inline] BUG: KASAN: use-after-free in consume_skb+0x27/0x110 net/core/skbuff.c:908 Read of size 4 at addr ffff88807c7e249c by task kworker/0:5/7743 CPU: 0 PID: 7743 Comm: kworker/0:5 Not tainted 5.16.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events bpf_map_free_deferred Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x380 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:450 kasan_check_range+0x2b5/0x2f0 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] skb_unref include/linux/skbuff.h:1076 [inline] consume_skb+0x27/0x110 net/core/skbuff.c:908 __sk_msg_free+0x788/0x820 net/core/skmsg.c:196 sk_msg_free net/core/skmsg.c:209 [inline] __sk_psock_purge_ingress_msg net/core/skmsg.c:748 [inline] __sk_psock_zap_ingress net/core/skmsg.c:766 [inline] sk_psock_stop+0x3f5/0x4a0 net/core/skmsg.c:784 sk_psock_drop+0x21f/0x330 net/core/skmsg.c:826 sock_hash_free+0x535/0x810 net/core/sock_map.c:1141 process_one_work+0x853/0x1140 kernel/workqueue.c:2298 worker_thread+0xac1/0x1320 kernel/workqueue.c:2445 kthread+0x468/0x490 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 Allocated by task 15530: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0xb6/0xf0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x1c9/0x310 mm/slub.c:3247 skb_clone+0x1b4/0x360 net/core/skbuff.c:1521 sk_psock_verdict_recv+0x68/0x640 net/core/skmsg.c:1157 unix_read_sock+0x130/0x370 net/unix/af_unix.c:2420 sk_psock_verdict_data_ready+0x166/0x1e0 net/core/skmsg.c:1200 unix_dgram_sendmsg+0x19cc/0x2a50 net/unix/af_unix.c:1941 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg net/socket.c:724 [inline] ____sys_sendmsg+0x5b9/0x910 net/socket.c:2409 ___sys_sendmsg net/socket.c:2463 [inline] __sys_sendmmsg+0x3ba/0x750 net/socket.c:2549 __do_sys_sendmmsg net/socket.c:2578 [inline] __se_sys_sendmmsg net/socket.c:2575 [inline] __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2575 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 7850: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x10d/0x150 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1749 slab_free mm/slub.c:3513 [inline] kmem_cache_free+0x95/0x190 mm/slub.c:3529 sock_drop include/linux/skmsg.h:310 [inline] sk_psock_backlog+0xf98/0x1130 net/core/skmsg.c:668 process_one_work+0x853/0x1140 kernel/workqueue.c:2298 worker_thread+0xac1/0x1320 kernel/workqueue.c:2445 kthread+0x468/0x490 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff88807c7e23c0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 220 bytes inside of 232-byte region [ffff88807c7e23c0, ffff88807c7e24a8) The buggy address belongs to the page: page:ffffea0001f1f880 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807c7e2280 pfn:0x7c7e2 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000d41348 ffffea0001f91b08 ffff888016387640 raw: ffff88807c7e2280 00000000000c000a 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 6486, ts 104026521819, free_ts 96851049602 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0x729/0x9e0 mm/page_alloc.c:4149 __alloc_pages+0x255/0x580 mm/page_alloc.c:5369 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab+0xcc/0x4d0 mm/slub.c:1930 new_slab mm/slub.c:1993 [inline] ___slab_alloc+0x41e/0xc40 mm/slub.c:3022 kmem_cache_alloc_bulk+0x1ed/0x590 mm/slub.c:3706 napi_skb_cache_get+0x113/0x1e0 net/core/skbuff.c:176 __alloc_skb+0xe9/0x5a0 net/core/skbuff.c:412 __napi_alloc_skb+0x155/0x2d0 net/core/skbuff.c:568 napi_alloc_skb include/linux/skbuff.h:2971 [inline] page_to_skb+0x27f/0xcc0 drivers/net/virtio_net.c:437 receive_mergeable+0x310/0x3b10 drivers/net/virtio_net.c:1042 receive_buf+0x158/0x1dc0 drivers/net/virtio_net.c:1152 virtnet_receive drivers/net/virtio_net.c:1444 [inline] virtnet_poll+0x5ed/0x11c0 drivers/net/virtio_net.c:1553 __napi_poll+0xbd/0x520 net/core/dev.c:7020 napi_poll net/core/dev.c:7087 [inline] net_rx_action+0x61c/0xf30 net/core/dev.c:7174 __do_softirq+0x392/0x7a3 kernel/softirq.c:558 __irq_exit_rcu+0xec/0x170 kernel/softirq.c:636 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0xd1c/0xe00 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x7d/0x580 mm/page_alloc.c:3388 skb_release_data+0x2b0/0x4f0 net/core/skbuff.c:672 skb_release_all net/core/skbuff.c:742 [inline] __kfree_skb+0x56/0x1d0 net/core/skbuff.c:756 sk_eat_skb include/net/sock.h:2652 [inline] tcp_recvmsg_locked+0x15b4/0x29b0 net/ipv4/tcp.c:2485 tcp_recvmsg+0x266/0x810 net/ipv4/tcp.c:2531 inet_recvmsg+0x156/0x270 net/ipv4/af_inet.c:850 sock_recvmsg_nosec net/socket.c:944 [inline] sock_recvmsg net/socket.c:962 [inline] sock_read_iter+0x3a7/0x4d0 net/socket.c:1035 call_read_iter include/linux/fs.h:2156 [inline] new_sync_read fs/read_write.c:400 [inline] vfs_read+0xaf9/0xe60 fs/read_write.c:481 ksys_read+0x18f/0x2c0 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88807c7e2380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88807c7e2400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807c7e2480: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807c7e2500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807c7e2580: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ==================================================================