================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: slab-use-after-free in refcount_read include/linux/refcount.h:147 [inline] BUG: KASAN: slab-use-after-free in skb_unref include/linux/skbuff.h:1217 [inline] BUG: KASAN: slab-use-after-free in consume_skb+0x32/0x170 net/core/skbuff.c:1273 Read of size 4 at addr ffff8880742afea4 by task kworker/1:1/26 CPU: 1 PID: 26 Comm: kworker/1:1 Not tainted 6.5.0-syzkaller-03967-gbd6c11bc43c4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Workqueue: events sk_psock_destroy Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 check_region_inline mm/kasan/generic.c:181 [inline] kasan_check_range+0xef/0x190 mm/kasan/generic.c:187 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] refcount_read include/linux/refcount.h:147 [inline] skb_unref include/linux/skbuff.h:1217 [inline] consume_skb+0x32/0x170 net/core/skbuff.c:1273 __sk_msg_free+0x230/0x380 net/core/skmsg.c:206 sk_msg_free net/core/skmsg.c:219 [inline] __sk_psock_purge_ingress_msg net/core/skmsg.c:770 [inline] __sk_psock_zap_ingress net/core/skmsg.c:783 [inline] sk_psock_destroy+0x335/0xa50 net/core/skmsg.c:815 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2600 worker_thread+0x687/0x1110 kernel/workqueue.c:2751 kthread+0x33a/0x430 kernel/kthread.c:389 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5035: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3470 [inline] kmem_cache_alloc_node+0x185/0x3f0 mm/slub.c:3515 __alloc_skb+0x287/0x330 net/core/skbuff.c:634 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6299 sock_alloc_send_pskb+0x7c8/0x950 net/core/sock.c:2794 unix_dgram_sendmsg+0x455/0x1c30 net/unix/af_unix.c:1953 sock_sendmsg_nosec net/socket.c:728 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:751 ____sys_sendmsg+0x2ac/0x940 net/socket.c:2538 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2592 __sys_sendmmsg+0x1a1/0x450 net/socket.c:2678 __do_sys_sendmmsg net/socket.c:2707 [inline] __se_sys_sendmmsg net/socket.c:2704 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2704 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 26: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15e/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1792 [inline] slab_free_freelist_hook+0x10b/0x1e0 mm/slub.c:1818 slab_free mm/slub.c:3801 [inline] kmem_cache_free+0xf0/0x490 mm/slub.c:3823 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:1004 __kfree_skb net/core/skbuff.c:1062 [inline] kfree_skb_reason+0x10e/0x210 net/core/skbuff.c:1097 kfree_skb include/linux/skbuff.h:1234 [inline] sock_drop include/linux/skmsg.h:307 [inline] __sk_psock_zap_ingress net/core/skmsg.c:781 [inline] sk_psock_destroy+0x18d/0xa50 net/core/skmsg.c:815 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2600 worker_thread+0x687/0x1110 kernel/workqueue.c:2751 kthread+0x33a/0x430 kernel/kthread.c:389 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff8880742afdc0 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 228 bytes inside of freed 240-byte region [ffff8880742afdc0, ffff8880742afeb0) The buggy address belongs to the physical page: page:ffffea0001d0abc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x742af flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff88814226c500 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800c000c 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 0x12820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 5028, tgid 5028 (sshd), ts 59270976049, free_ts 53053702437 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2298 alloc_slab_page mm/slub.c:1862 [inline] allocate_slab+0x24e/0x380 mm/slub.c:2009 new_slab mm/slub.c:2062 [inline] ___slab_alloc+0x8bc/0x1570 mm/slub.c:3215 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314 __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x392/0x3b0 mm/slub.c:3494 skb_clone+0x171/0x3c0 net/core/skbuff.c:1905 dev_queue_xmit_nit+0x38b/0xb80 net/core/dev.c:2284 xmit_one net/core/dev.c:3540 [inline] dev_hard_start_xmit+0x59/0x6c0 net/core/dev.c:3560 sch_direct_xmit+0x1ac/0xc20 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3771 [inline] __dev_queue_xmit+0x1282/0x3d80 net/core/dev.c:4306 dev_queue_xmit include/linux/netdevice.h:3082 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip_finish_output2+0x1626/0x24c0 net/ipv4/ip_output.c:230 __ip_finish_output net/ipv4/ip_output.c:308 [inline] __ip_finish_output+0x38b/0x640 net/ipv4/ip_output.c:290 ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:318 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+0x508/0xb90 mm/page_alloc.c:2348 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2443 __folio_put_small mm/swap.c:106 [inline] __folio_put+0xc5/0x140 mm/swap.c:129 folio_put include/linux/mm.h:1440 [inline] put_page include/linux/mm.h:1509 [inline] anon_pipe_buf_release+0x3fa/0x4b0 fs/pipe.c:138 pipe_buf_release include/linux/pipe_fs_i.h:203 [inline] pipe_read+0x635/0x1270 fs/pipe.c:324 call_read_iter include/linux/fs.h:1979 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x7ef/0x930 fs/read_write.c:470 ksys_read+0x1f0/0x250 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880742afd80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff8880742afe00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880742afe80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff8880742aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880742aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================