================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [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:1207 [inline] BUG: KASAN: use-after-free in consume_skb+0x3c/0x250 net/core/skbuff.c:1029 Read of size 4 at addr ffff8881257aa0f4 by task kworker/0:2/297 CPU: 0 PID: 297 Comm: kworker/0:2 Not tainted 6.1.25-syzkaller-01031-g1fe248991f96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Workqueue: events sk_psock_destroy Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 kasan_check_range+0x294/0x2a0 mm/kasan/generic.c:189 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:72 [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:1207 [inline] consume_skb+0x3c/0x250 net/core/skbuff.c:1029 __sk_msg_free+0x2dd/0x370 net/core/skmsg.c:205 sk_msg_free net/core/skmsg.c:218 [inline] __sk_psock_purge_ingress_msg net/core/skmsg.c:769 [inline] __sk_psock_zap_ingress net/core/skmsg.c:782 [inline] sk_psock_destroy+0x351/0x810 net/core/skmsg.c:814 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2296 worker_thread+0xa60/0x1260 kernel/workqueue.c:2443 kthread+0x26d/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 356: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:333 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:768 slab_alloc_node mm/slub.c:3418 [inline] kmem_cache_alloc_node+0x18a/0x2d0 mm/slub.c:3463 __alloc_skb+0xcc/0x2c0 net/core/skbuff.c:497 alloc_skb include/linux/skbuff.h:1275 [inline] alloc_skb_with_frags+0xa6/0x680 net/core/skbuff.c:6133 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2727 unix_dgram_sendmsg+0x5b1/0x2050 net/unix/af_unix.c:1943 sock_sendmsg_nosec net/socket.c:716 [inline] sock_sendmsg net/socket.c:736 [inline] ____sys_sendmsg+0x5dc/0x9d0 net/socket.c:2482 ___sys_sendmsg net/socket.c:2536 [inline] __sys_sendmmsg+0x3b9/0x6f0 net/socket.c:2622 __do_sys_sendmmsg net/socket.c:2651 [inline] __se_sys_sendmmsg net/socket.c:2648 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2648 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 297: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x131/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1744 [inline] slab_free_freelist_hook mm/slub.c:1770 [inline] slab_free mm/slub.c:3681 [inline] kmem_cache_free+0x291/0x510 mm/slub.c:3703 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:869 [inline] kfree_skb_reason+0xdb/0x250 net/core/skbuff.c:891 kfree_skb include/linux/skbuff.h:1224 [inline] sock_drop include/linux/skmsg.h:306 [inline] __sk_psock_zap_ingress net/core/skmsg.c:780 [inline] sk_psock_destroy+0x143/0x810 net/core/skmsg.c:814 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2296 worker_thread+0xa60/0x1260 kernel/workqueue.c:2443 kthread+0x26d/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff8881257aa000 which belongs to the cache skbuff_head_cache of size 256 The buggy address is located 244 bytes inside of 256-byte region [ffff8881257aa000, ffff8881257aa100) The buggy address belongs to the physical page: page:ffffea000495ea80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1257aa flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff888100b91c80 raw: 0000000000000000 00000000000c000c 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 39, tgid 39 (kworker/1:1), ts 40180939514, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2582 prep_new_page+0x1b/0x110 mm/page_alloc.c:2589 get_page_from_freelist+0x2762/0x27f0 mm/page_alloc.c:4387 __alloc_pages+0x3a1/0x780 mm/page_alloc.c:5669 allocate_slab mm/slub.c:1959 [inline] new_slab+0xce/0x4c0 mm/slub.c:2012 ___slab_alloc+0x6f9/0xb80 mm/slub.c:3200 __slab_alloc+0x5d/0xa0 mm/slub.c:3299 slab_alloc_node mm/slub.c:3384 [inline] kmem_cache_alloc_node+0x1c9/0x2d0 mm/slub.c:3463 __alloc_skb+0xcc/0x2c0 net/core/skbuff.c:497 alloc_skb include/linux/skbuff.h:1275 [inline] alloc_skb_with_frags+0xa6/0x680 net/core/skbuff.c:6133 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2727 sock_alloc_send_skb include/net/sock.h:1900 [inline] mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748 add_grhead net/ipv6/mcast.c:1851 [inline] add_grec+0xe34/0x14a0 net/ipv6/mcast.c:1989 mld_send_cr net/ipv6/mcast.c:2115 [inline] mld_ifc_work+0x72e/0xba0 net/ipv6/mcast.c:2653 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2296 worker_thread+0xa60/0x1260 kernel/workqueue.c:2443 page_owner free stack trace missing Memory state around the buggy address: ffff8881257a9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881257aa000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881257aa080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881257aa100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff8881257aa180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================