================================================================== BUG: KASAN: use-after-free in tcp_skb_pcount include/net/tcp.h:798 [inline] BUG: KASAN: use-after-free in tcp_init_tso_segs net/ipv4/tcp_output.c:1631 [inline] BUG: KASAN: use-after-free in tcp_write_xmit+0x3b22/0x4680 net/ipv4/tcp_output.c:2068 Read of size 2 at addr ffff8800b09f4f30 by task syz-executor2/7414 CPU: 0 PID: 7414 Comm: syz-executor2 Not tainted 4.4.157+ #37 0000000000000000 5c88fb259a280f53 ffff8800b9257838 ffffffff81a559fd ffffea0002c27d00 ffff8800b09f4f30 0000000000000000 ffff8800b09f4f30 dffffc0000000000 ffff8800b9257870 ffffffff8146c697 ffff8800b09f4f30 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x6c/0x217 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report.cold.6+0x175/0x2f7 mm/kasan/report.c:408 [] __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:427 [] tcp_skb_pcount include/net/tcp.h:798 [inline] [] tcp_init_tso_segs net/ipv4/tcp_output.c:1631 [inline] [] tcp_write_xmit+0x3b22/0x4680 net/ipv4/tcp_output.c:2068 [] __tcp_push_pending_frames+0xa4/0x2a0 net/ipv4/tcp_output.c:2319 [] tcp_send_fin+0x176/0xab0 net/ipv4/tcp_output.c:2895 [] tcp_close+0xc97/0xf60 net/ipv4/tcp.c:2112 [] inet_release+0xff/0x1d0 net/ipv4/af_inet.c:435 [] __sock_release+0xd9/0x260 net/socket.c:592 [] sock_close+0x19/0x20 net/socket.c:1050 [] __fput+0x235/0x6f0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x10f/0x190 kernel/task_work.c:115 [] get_signal+0x1182/0x14a0 kernel/signal.c:2151 [] do_signal+0x95/0x1840 arch/x86/kernel/signal.c:712 [] exit_to_usermode_loop+0x11a/0x160 arch/x86/entry/common.c:249 [] prepare_exit_to_usermode arch/x86/entry/common.c:284 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:349 [inline] [] do_syscall_32_irqs_on arch/x86/entry/common.c:399 [inline] [] do_fast_syscall_32+0x618/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a Allocated by task 7405: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:616 [] kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:601 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:554 [] slab_post_alloc_hook mm/slub.c:1349 [inline] [] slab_alloc_node mm/slub.c:2615 [inline] [] slab_alloc mm/slub.c:2623 [inline] [] kmem_cache_alloc+0xdc/0x2c0 mm/slub.c:2628 [] kmem_cache_alloc_node include/linux/slab.h:350 [inline] [] __alloc_skb+0xe6/0x5b0 net/core/skbuff.c:218 [] alloc_skb_fclone include/linux/skbuff.h:856 [inline] [] sk_stream_alloc_skb+0xa3/0x5d0 net/ipv4/tcp.c:833 [] tcp_sendmsg+0xf81/0x2b30 net/ipv4/tcp.c:1178 [] inet_sendmsg+0x203/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbb/0x110 net/socket.c:648 [] SYSC_sendto net/socket.c:1678 [inline] [] SyS_sendto+0x220/0x370 net/socket.c:1646 [] do_syscall_32_irqs_on arch/x86/entry/common.c:393 [inline] [] do_fast_syscall_32+0x31e/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a Freed by task 7414: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0xac/0x190 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kmem_cache_free+0xbe/0x340 mm/slub.c:2881 [] kfree_skbmem+0xcf/0x100 net/core/skbuff.c:635 [] __kfree_skb+0x1d/0x20 net/core/skbuff.c:676 [] sk_wmem_free_skb include/net/sock.h:1447 [inline] [] tcp_write_queue_purge include/net/tcp.h:1460 [inline] [] tcp_connect_init net/ipv4/tcp_output.c:3134 [inline] [] tcp_connect+0xae9/0x3110 net/ipv4/tcp_output.c:3273 [] tcp_v4_connect+0xf31/0x1890 net/ipv4/tcp_ipv4.c:246 [] __inet_stream_connect+0x2a9/0xc30 net/ipv4/af_inet.c:615 [] inet_stream_connect+0x55/0xa0 net/ipv4/af_inet.c:676 [] SYSC_connect net/socket.c:1570 [inline] [] SyS_connect+0x1b8/0x310 net/socket.c:1551 [] do_syscall_32_irqs_on arch/x86/entry/common.c:393 [inline] [] do_fast_syscall_32+0x31e/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a The buggy address belongs to the object at ffff8800b09f4f00 which belongs to the cache skbuff_fclone_cache of size 456 The buggy address is located 48 bytes inside of 456-byte region [ffff8800b09f4f00, ffff8800b09f50c8) The buggy address belongs to the page: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 1 PID: 2147 Comm: syz-executor1 Not tainted 4.4.157+ #37 task: ffff8801d2d2af80 task.stack: ffff8801d2c98000 RIP: 0010:[] [] timerqueue_add+0xb8/0x2b0 lib/timerqueue.c:51 RSP: 0018:ffff8801d2c9fa68 EFLAGS: 00010006 RAX: ffffed003a593fa8 RBX: ffff8801d2c9fd28 RCX: ffffed003a5a5708 RDX: 00001083e1e5ccc3 RSI: ffffffff81a7262c RDI: 0000841f0f2e6618 RBP: ffff8801d2c9faa8 R08: ffff8801d2d2b848 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000001 R12: dffffc0000000000 R13: 0000841f0f2e6600 R14: 00000032e592c4bd R15: ffffffff8140a835 FS: 0000000000000000(0000) GS:ffff8801db700000(0063) knlGS:000000000a0cf900 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f771affc CR3: 00000001d3bf6000 CR4: 00000000001606b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8801d2c9fd40 ffff8801db719390 ffffed003a593fa8 ffff8801db719380 ffff8801d2c9fd28 ffff8801db7192c0 0000000000000001 0000000000000000 ffff8801d2c9fae0 ffffffff81252cef 0000000000000863 ffff8801db719380 Call Trace: [] enqueue_hrtimer+0x15f/0x440 kernel/time/hrtimer.c:893 [] hrtimer_start_range_ns+0x573/0x1410 kernel/time/hrtimer.c:1013 [] hrtimer_start_expires include/linux/hrtimer.h:407 [inline] [] do_nanosleep+0x196/0x4f0 kernel/time/hrtimer.c:1500 [] hrtimer_nanosleep+0x210/0x550 kernel/time/hrtimer.c:1572 [] C_SYSC_nanosleep kernel/compat.c:254 [inline] [] compat_SyS_nanosleep+0x289/0x390 kernel/compat.c:239 [] do_syscall_32_irqs_on arch/x86/entry/common.c:393 [inline] [] do_fast_syscall_32+0x31e/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a Code: 00 00 4d 8b 2f 4d 85 ed 74 3d e8 54 27 88 ff 48 8b 45 d0 80 38 00 0f 85 96 01 00 00 49 8d 7d 18 4c 8b 73 18 48 89 fa 48 c1 ea 03 <42> 80 3c 22 00 0f 85 8a 01 00 00 4d 3b 75 18 7c a3 e8 22 27 88 RIP [] timerqueue_add+0xb8/0x2b0 lib/timerqueue.c:51 RSP ---[ end trace 04040c2bc9f108e1 ]---