==================================================================
BUG: KASAN: use-after-free in do_csum+0x2c1/0x2e0 lib/checksum.c:56
Read of size 1 at addr ffff888079ee7f35 by task syz-executor.5/8860
CPU: 1 PID: 8860 Comm: syz-executor.5 Not tainted 6.1.0-syzkaller-11778-gc183e6c3ec34 #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+0x2c1/0x2e0 lib/checksum.c:56
 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
 invoke_softirq kernel/softirq.c:445 [inline]
 __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
 irq_exit_rcu+0x9/0x20 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1107
 
 
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x3c/0x70 kernel/locking/spinlock.c:194
Code: 74 24 10 e8 56 f6 5a f7 48 89 ef e8 fe 62 5b f7 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00  3f c6 4d f7 65 8b 05 f0 b2 fa 75 85 c0 74 0a 5b 5d c3 e8 fc da
RSP: 0018:ffffc9000420f1f0 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff226f946
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001
RBP: ffff888012440780 R08: 0000000000000001 R09: ffffffff91335b7f
R10: 0000000000000001 R11: 0000000000000000 R12: ffff888012440780
R13: ffff888028d4f800 R14: ffff88804612e000 R15: ffff888012441c80
 spin_unlock_irqrestore include/linux/spinlock.h:405 [inline]
 get_partial_node.part.0+0x209/0x3d0 mm/slub.c:2308
 get_partial_node mm/slub.c:2268 [inline]
 get_partial mm/slub.c:2386 [inline]
 ___slab_alloc+0xcd7/0x1400 mm/slub.c:3188
 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292
 __slab_alloc_node mm/slub.c:3345 [inline]
 slab_alloc_node mm/slub.c:3442 [inline]
 __kmem_cache_alloc_node+0x1a4/0x430 mm/slub.c:3491
 __do_kmalloc_node mm/slab_common.c:967 [inline]
 __kmalloc_node_track_caller+0x4b/0xc0 mm/slab_common.c:988
 kmalloc_reserve net/core/skbuff.c:492 [inline]
 __alloc_skb+0xe9/0x310 net/core/skbuff.c:565
 alloc_skb include/linux/skbuff.h:1270 [inline]
 alloc_skb_with_frags+0x97/0x6c0 net/core/skbuff.c:6195
 sock_alloc_send_pskb+0x7a7/0x930 net/core/sock.c:2741
 sock_alloc_send_skb include/net/sock.h:1888 [inline]
 __ip_append_data+0x1ac7/0x39f0 net/ipv4/ip_output.c:1120
 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
RIP: 0033:0x7f4b2028c0a9
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:00007f4b1edfe168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f4b203abf80 RCX: 00007f4b2028c0a9
RDX: 0000000000000000 RSI: 0000000020001280 RDI: 0000000000000026
RBP: 00007f4b202e7ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcdda140af R14: 00007f4b1edfe300 R15: 0000000000022000
 
The buggy address belongs to the physical page:
page:ffffea0001e7b9c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x79ee7
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000001 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 8860, tgid 8859 (syz-executor.5), ts 322979465366, free_ts 322980486178
 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:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1446 [inline]
 free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496
 free_unref_page_prepare mm/page_alloc.c:3369 [inline]
 free_unref_page+0x1d/0x490 mm/page_alloc.c:3464
 __folio_put_large mm/swap.c:119 [inline]
 __folio_put+0x109/0x140 mm/swap.c:127
 folio_put include/linux/mm.h:1250 [inline]
 put_page include/linux/mm.h:1319 [inline]
 __skb_frag_unref include/linux/skbuff.h:3388 [inline]
 skb_release_data+0x522/0x870 net/core/skbuff.c:845
 skb_release_all net/core/skbuff.c:916 [inline]
 __kfree_skb net/core/skbuff.c:930 [inline]
 kfree_skb_reason+0x1ab/0x4f0 net/core/skbuff.c:956
 icmp_rcv+0x8c7/0x1030 net/ipv4/icmp.c:1274
 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
Memory state around the buggy address:
 ffff888079ee7e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888079ee7e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888079ee7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                     ^
 ffff888079ee7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888079ee8000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
   0:	74 24                	je     0x26
   2:	10 e8                	adc    %ch,%al
   4:	56                   	push   %rsi
   5:	f6 5a f7             	negb   -0x9(%rdx)
   8:	48 89 ef             	mov    %rbp,%rdi
   b:	e8 fe 62 5b f7       	callq  0xf75b630e
  10:	81 e3 00 02 00 00    	and    $0x200,%ebx
  16:	75 25                	jne    0x3d
  18:	9c                   	pushfq
  19:	58                   	pop    %rax
  1a:	f6 c4 02             	test   $0x2,%ah
  1d:	75 2d                	jne    0x4c
  1f:	48 85 db             	test   %rbx,%rbx
  22:	74 01                	je     0x25
  24:	fb                   	sti
  25:	bf 01 00 00 00       	mov    $0x1,%edi
* 2a:	e8 3f c6 4d f7       	callq  0xf74dc66e <-- trapping instruction
  2f:	65 8b 05 f0 b2 fa 75 	mov    %gs:0x75fab2f0(%rip),%eax        # 0x75fab326
  36:	85 c0                	test   %eax,%eax
  38:	74 0a                	je     0x44
  3a:	5b                   	pop    %rbx
  3b:	5d                   	pop    %rbp
  3c:	c3                   	retq
  3d:	e8                   	.byte 0xe8
  3e:	fc                   	cld
  3f:	da                   	.byte 0xda