BUG: KASAN: slab-out-of-bounds in sg_mark_end include/linux/scatterlist.h:190 [inline] BUG: KASAN: slab-out-of-bounds in tls_push_record+0x10cc/0x1270 net/tls/tls_sw.c:255 Read of size 8 at addr ffff8880b3b6f538 by task syz-executor.1/11297 CPU: 1 PID: 11297 Comm: syz-executor.1 Not tainted 4.14.232-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 sg_mark_end include/linux/scatterlist.h:190 [inline] tls_push_record+0x10cc/0x1270 net/tls/tls_sw.c:255 tls_handle_open_record net/tls/tls_main.c:158 [inline] tls_sk_proto_close+0x6f0/0x8b0 net/tls/tls_main.c:270 inet_release+0xdf/0x1b0 net/ipv4/af_inet.c:425 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:450 __sock_release+0xcd/0x2b0 net/socket.c:602 sock_close+0x15/0x20 net/socket.c:1139 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x41940b RSP: 002b:00007fffb98819d0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 000000000041940b RDX: 0000000000000000 RSI: 0000000009be9bb6 RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2dc24f00 R10: 0000000000000000 R11: 0000000000000293 R12: 000000000056c9e0 R13: 000000000056c9e0 R14: 000000000056bf60 R15: 0000000000035b1f Allocated by task 7957: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3696 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 alloc_skb_fclone include/linux/skbuff.h:1022 [inline] sk_stream_alloc_skb+0xb1/0x760 net/ipv4/tcp.c:855 tcp_sendmsg_locked+0xed8/0x2ef0 net/ipv4/tcp.c:1301 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 sock_write_iter+0x22c/0x370 net/socket.c:925 call_write_iter include/linux/fs.h:1778 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 7948: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb+0x46/0x60 net/core/skbuff.c:654 sk_wmem_free_skb include/net/sock.h:1425 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3187 [inline] tcp_ack+0x187b/0x4580 net/ipv4/tcp_input.c:3687 tcp_rcv_established+0xebb/0x1810 net/ipv4/tcp_input.c:5501 tcp_v4_do_rcv+0x541/0x7d0 net/ipv4/tcp_ipv4.c:1476 tcp_v4_rcv+0x275c/0x3560 net/ipv4/tcp_ipv4.c:1750 ip_local_deliver_finish+0x3f2/0xab0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:250 [inline] ip_local_deliver+0x167/0x460 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:476 [inline] ip_rcv_finish+0x6e3/0x19f0 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:250 [inline] ip_rcv+0x8a7/0xf10 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x15ee/0x2a30 net/core/dev.c:4474 __netif_receive_skb+0x27/0x1a0 net/core/dev.c:4512 netif_receive_skb_internal+0xd7/0x580 net/core/dev.c:4585 napi_skb_finish net/core/dev.c:4946 [inline] napi_gro_receive+0x2e2/0x400 net/core/dev.c:4977 receive_buf+0xaef/0x4b90 drivers/net/virtio_net.c:852 virtnet_receive drivers/net/virtio_net.c:1098 [inline] virtnet_poll+0x4b7/0x960 drivers/net/virtio_net.c:1189 napi_poll net/core/dev.c:5596 [inline] net_rx_action+0x466/0xfd0 net/core/dev.c:5662 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 The buggy address belongs to the object at ffff8880b3b6ecc0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 120 bytes to the right of 2048-byte region [ffff8880b3b6ecc0, ffff8880b3b6f4c0) The buggy address belongs to the page: page:ffffea0002cedb80 count:1 mapcount:0 mapping:ffff8880b3b6e440 index:0xffff8880b3b6ecc0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880b3b6e440 ffff8880b3b6ecc0 0000000100000002 raw: ffffea0002d5e120 ffffea00025a1920 ffff88813fe80c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b3b6f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b3b6f480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880b3b6f500: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff8880b3b6f580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880b3b6f600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== audit: type=1326 audit(1620583983.010:8): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=11329 comm="syz-executor.4" exe="/root/syz-executor.4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0