==================================================================
BUG: KASAN: use-after-free in do_csum+0x2db/0x2e0 lib/checksum.c:73
Read of size 4 at addr ffff88801eff8000 by task syz-executor.2/9877
CPU: 0 PID: 9877 Comm: syz-executor.2 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+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
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:finish_task_switch.isra.0+0x2bf/0xc80 kernel/sched/core.c:5123
Code: 8b 3a 4c 89 e7 48 c7 02 00 00 00 00 ff d1 4d 85 ff 75 bf 4c 89 e7 e8 10 f8 ff ff e8 ab 96 30 00 fb 65 48 8b 1c 25 00 ac 03 00 <48> 8d bb 48 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0018:ffffc900036b7a80 EFLAGS: 00000202
RAX: 000000000000135b RBX: ffff8880473b3a80 RCX: 1ffffffff1ce5581
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900036b7ac8 R08: 0000000000000001 R09: 0000000000000001
R10: ffffed10173076b0 R11: 0000000000000000 R12: ffff8880b983b580
R13: ffff888022728000 R14: 0000000000000000 R15: ffff8880b983bfb8
context_switch kernel/sched/core.c:5247 [inline]
__schedule+0xb92/0x5450 kernel/sched/core.c:6555
schedule+0xde/0x1b0 kernel/sched/core.c:6631
do_nanosleep+0x154/0x4f0 kernel/time/hrtimer.c:2044
hrtimer_nanosleep+0x1fd/0x4b0 kernel/time/hrtimer.c:2097
common_nsleep+0xa6/0xd0 kernel/time/posix-timers.c:1236
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1276 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1254 [inline]
__x64_sys_clock_nanosleep+0x2f8/0x430 kernel/time/posix-timers.c:1254
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:0x7f02222b0dd1
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 aa e7 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 e3 e7 ff ff 48 8b 04 24 eb 97 66 2e 0f 1f
RSP: 002b:00007ffd113f5ea0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 00007f02223abf80 RCX: 00007f02222b0dd1
RDX: 00007ffd113f5ee0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007f02223ad980 R08: 0000000000000000 R09: 00007ffd113f7080
R10: 0000000000000000 R11: 0000000000000293 R12: 000000000006688f
R13: 00007ffd113f5ff0 R14: 00007f02223ac050 R15: 0000000000000032
The buggy address belongs to the physical page:
page:ffffea00007bfe00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1eff8
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0000b9a408 ffff8880b9842260 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 9906, tgid 9904 (syz-executor.4), ts 419499492520, free_ts 419500495428
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:
ffff88801eff7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88801eff7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801eff8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88801eff8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88801eff8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 8b 3a mov (%rdx),%edi
2: 4c 89 e7 mov %r12,%rdi
5: 48 c7 02 00 00 00 00 movq $0x0,(%rdx)
c: ff d1 callq *%rcx
e: 4d 85 ff test %r15,%r15
11: 75 bf jne 0xffffffd2
13: 4c 89 e7 mov %r12,%rdi
16: e8 10 f8 ff ff callq 0xfffff82b
1b: e8 ab 96 30 00 callq 0x3096cb
20: fb sti
21: 65 48 8b 1c 25 00 ac mov %gs:0x3ac00,%rbx
28: 03 00
* 2a: 48 8d bb 48 15 00 00 lea 0x1548(%rbx),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1