================================================================== BUG: KASAN: use-after-free in tcp_highest_sack_seq include/net/tcp.h:1852 [inline] BUG: KASAN: use-after-free in tcp_check_sack_reordering+0x2ef/0x360 net/ipv4/tcp_input.c:891 Read of size 4 at addr ffff888099fa2a68 by task syz-executor.4/8149 CPU: 0 PID: 8149 Comm: syz-executor.4 Not tainted 5.5.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:134 tcp_highest_sack_seq include/net/tcp.h:1852 [inline] tcp_check_sack_reordering+0x2ef/0x360 net/ipv4/tcp_input.c:891 tcp_try_undo_partial net/ipv4/tcp_input.c:2727 [inline] tcp_fastretrans_alert+0xe2f/0x2550 net/ipv4/tcp_input.c:2844 tcp_ack+0x1f61/0x5aa0 net/ipv4/tcp_input.c:3707 tcp_rcv_established+0x830/0x2260 net/ipv4/tcp_input.c:5698 tcp_v4_do_rcv+0x526/0x790 net/ipv4/tcp_ipv4.c:1562 sk_backlog_rcv include/net/sock.h:954 [inline] __release_sock+0x10b/0x330 net/core/sock.c:2437 release_sock+0x4f/0x180 net/core/sock.c:2953 sk_stream_wait_memory+0x4df/0xcb0 net/core/stream.c:145 tcp_sendmsg_locked+0xb2e/0x37f0 net/ipv4/tcp.c:1394 tcp_sendmsg+0x27/0x40 net/ipv4/tcp.c:1434 inet_sendmsg+0x8f/0xb0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:659 __sys_sendto+0x1f2/0x2e0 net/socket.c:1985 __do_sys_sendto net/socket.c:1997 [inline] __se_sys_sendto net/socket.c:1993 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1993 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45aff9 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f5d69d20c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f5d69d216d4 RCX: 000000000045aff9 RDX: ffffffffffffff67 RSI: 0000000020000640 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: ffffffffffffff4f R10: 00000000040007bd R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000992 R14: 00000000004cacca R15: 000000000075bf2c Allocated by task 8149: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:513 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:521 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slab.c:3263 [inline] kmem_cache_alloc_node+0x138/0x760 mm/slab.c:3575 __alloc_skb+0xa7/0x570 net/core/skbuff.c:197 alloc_skb_fclone include/linux/skbuff.h:1099 [inline] sk_stream_alloc_skb+0x278/0xbb0 net/ipv4/tcp.c:877 tcp_sendmsg_locked+0xa3d/0x37f0 net/ipv4/tcp.c:1284 tcp_sendmsg+0x27/0x40 net/ipv4/tcp.c:1434 inet_sendmsg+0x8f/0xb0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:659 __sys_sendto+0x1f2/0x2e0 net/socket.c:1985 __do_sys_sendto net/socket.c:1997 [inline] __se_sys_sendto net/socket.c:1993 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1993 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8155: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x83/0x320 mm/slab.c:3694 kfree_skbmem+0xfd/0x130 net/core/skbuff.c:644 __kfree_skb+0x15/0x20 net/core/skbuff.c:680 sk_eat_skb include/net/sock.h:2468 [inline] tcp_recvmsg+0x163a/0x24e0 net/ipv4/tcp.c:2166 inet_recvmsg+0x110/0x6a0 net/ipv4/af_inet.c:838 sock_recvmsg_nosec net/socket.c:873 [inline] sock_recvmsg+0xb7/0xf0 net/socket.c:891 __sys_recvfrom+0x327/0x3f0 net/socket.c:2042 __do_sys_recvfrom net/socket.c:2060 [inline] __se_sys_recvfrom net/socket.c:2056 [inline] __x64_sys_recvfrom+0xdc/0x1a0 net/socket.c:2056 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888099fa2a40 which belongs to the cache skbuff_fclone_cache of size 456 The buggy address is located 40 bytes inside of 456-byte region [ffff888099fa2a40, ffff888099fa2c08) The buggy address belongs to the page: page:ffffea000267e880 refcount:1 mapcount:0 mapping:ffff88821b0511c0 index:0x0 raw: 00fffe0000000200 ffffea0002a57e88 ffffea0002503d48 ffff88821b0511c0 raw: 0000000000000000 ffff888099fa2040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888099fa2900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099fa2980: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888099fa2a00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888099fa2a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099fa2b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================