================================================================== BUG: KASAN: use-after-free in do_csum+0x2db/0x2e0 lib/checksum.c:73 Read of size 4 at addr ffff888042690000 by task syz-executor.4/20382 CPU: 1 PID: 20382 Comm: syz-executor.4 Not tainted 6.1.0-syzkaller-04286-gbe1236fce5f4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x45d mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 do_csum+0x2db/0x2e0 lib/checksum.c:73 csum_partial+0x24/0x60 lib/checksum.c:128 __skb_checksum+0x4b6/0x890 net/core/skbuff.c:3094 skb_checksum net/core/skbuff.c:3146 [inline] __skb_checksum_complete+0xaf/0x3e0 net/core/skbuff.c:3268 __skb_checksum_validate_complete include/linux/skbuff.h:4436 [inline] icmp_rcv+0x55f/0x1030 net/ipv4/icmp.c:1205 ip_protocol_deliver_rcu+0x9f/0x460 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x2ec/0x4c0 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:302 [inline] NF_HOOK include/linux/netfilter.h:296 [inline] ip_local_deliver+0x1ae/0x200 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:454 [inline] ip_rcv_finish+0x1cf/0x2f0 net/ipv4/ip_input.c:449 NF_HOOK include/linux/netfilter.h:302 [inline] NF_HOOK include/linux/netfilter.h:296 [inline] ip_rcv+0xae/0xd0 net/ipv4/ip_input.c:569 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5482 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5596 process_backlog+0x3e4/0x810 net/core/dev.c:5924 __napi_poll+0xb8/0x770 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0xa00/0xde0 net/core/dev.c:6663 __do_softirq+0x1fb/0xadc kernel/softirq.c:571 do_softirq.part.0+0xde/0x130 kernel/softirq.c:472 do_softirq kernel/softirq.c:464 [inline] __local_bh_enable_ip+0x106/0x130 kernel/softirq.c:396 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:834 [inline] ip_finish_output2+0x7dc/0x2180 net/ipv4/ip_output.c:229 __ip_finish_output net/ipv4/ip_output.c:306 [inline] __ip_finish_output+0x396/0x650 net/ipv4/ip_output.c:288 ip_finish_output+0x31/0x280 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0x1a3/0x320 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] ip_send_skb net/ipv4/ip_output.c:1586 [inline] ip_push_pending_frames+0x129/0x2b0 net/ipv4/ip_output.c:1606 ping_v4_push_pending_frames net/ipv4/ping.c:657 [inline] ping_v4_sendmsg+0xef6/0x1790 net/ipv4/ping.c:843 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2476 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2530 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2559 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f665a88c0a9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f665b65c168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f665a9abf80 RCX: 00007f665a88c0a9 RDX: 0000000000000000 RSI: 0000000020001280 RDI: 0000000000000003 RBP: 00007f665a8e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff85bbd26f R14: 00007f665b65c300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea000109a400 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x42690 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0000ac3a08 ffff8880b9942260 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 0x1528c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 20382, tgid 20381 (syz-executor.4), ts 1739515046266, free_ts 1739516413129 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 skb_page_frag_refill net/core/sock.c:2865 [inline] skb_page_frag_refill+0x195/0x360 net/core/sock.c:2849 sk_page_frag_refill+0x58/0x300 net/core/sock.c:2885 __ip_append_data+0x9c1/0x39f0 net/ipv4/ip_output.c:1213 ip_append_data net/ipv4/ip_output.c:1343 [inline] ip_append_data+0x115/0x1a0 net/ipv4/ip_output.c:1322 ping_v4_sendmsg+0xaac/0x1790 net/ipv4/ping.c:837 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2476 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2530 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2559 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: create_dummy_stack mm/page_owner.c:67 [inline] register_dummy_stack+0x65/0xa4 mm/page_owner.c:73 init_page_owner+0x4c/0x636 mm/page_owner.c:91 invoke_init_callbacks mm/page_ext.c:126 [inline] page_ext_init+0x4c2/0x4d5 mm/page_ext.c:518 kernel_init_freeable+0x4c4/0x782 init/main.c:1632 Memory state around the buggy address: ffff88804268ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804268ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888042690000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888042690080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888042690100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================