hrtimer: interrupt took 45042 ns ================================================================== BUG: KASAN: use-after-free in tcp_skb_pcount include/net/tcp.h:911 [inline] BUG: KASAN: use-after-free in tcp_init_tso_segs+0x1ae/0x200 net/ipv4/tcp_output.c:1790 Read of size 2 at addr ffff8880915107f0 by task syz-executor.4/6951 CPU: 0 PID: 6951 Comm: syz-executor.4 Not tainted 4.14.143 #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+0x138/0x197 lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:428 tcp_skb_pcount include/net/tcp.h:911 [inline] tcp_init_tso_segs+0x1ae/0x200 net/ipv4/tcp_output.c:1790 tcp_write_xmit+0x15e/0x4960 net/ipv4/tcp_output.c:2330 __tcp_push_pending_frames+0xa6/0x260 net/ipv4/tcp_output.c:2563 tcp_send_fin+0x17e/0xc40 net/ipv4/tcp_output.c:3115 tcp_close+0xcc8/0xfb0 net/ipv4/tcp.c:2221 tls_sk_proto_close+0x157/0x750 net/tls/tls_main.c:295 inet_release+0xec/0x1c0 net/ipv4/af_inet.c:425 inet6_release+0x53/0x80 net/ipv6/af_inet6.c:450 __sock_release+0xce/0x2b0 net/socket.c:602 sock_close+0x1b/0x30 net/socket.c:1139 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 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+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4598e9 RSP: 002b:00007fb15d0a9c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00000000004598e9 RDX: 0000000000000001 RSI: 000000000000011a RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000028 R09: 0000000000000000 R10: 0000000020000100 R11: 0000000000000246 R12: 00007fb15d0aa6d4 R13: 00000000004c7f4f R14: 00000000004dde48 R15: 00000000ffffffff Allocated by task 6951: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc_node+0x144/0x780 mm/slab.c:3642 __alloc_skb+0x9c/0x500 net/core/skbuff.c:193 alloc_skb_fclone include/linux/skbuff.h:1022 [inline] sk_stream_alloc_skb+0xb3/0x780 net/ipv4/tcp.c:855 tcp_sendmsg_locked+0xf61/0x3200 net/ipv4/tcp.c:1301 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1457 inet_sendmsg+0x122/0x500 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 SYSC_sendto+0x206/0x310 net/socket.c:1763 SyS_sendto+0x40/0x50 net/socket.c:1731 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 6951: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x83/0x2b0 mm/slab.c:3758 kfree_skbmem+0x8d/0x120 net/core/skbuff.c:607 __kfree_skb+0x1e/0x30 net/core/skbuff.c:646 sk_wmem_free_skb include/net/sock.h:1416 [inline] tcp_remove_empty_skb.part.0+0x231/0x2e0 net/ipv4/tcp.c:929 tcp_remove_empty_skb net/ipv4/tcp.c:925 [inline] tcp_sendmsg_locked+0x1ced/0x3200 net/ipv4/tcp.c:1435 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1457 inet_sendmsg+0x122/0x500 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 SYSC_sendto+0x206/0x310 net/socket.c:1763 SyS_sendto+0x40/0x50 net/socket.c:1731 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8880915107c0 which belongs to the cache skbuff_fclone_cache of size 472 The buggy address is located 48 bytes inside of 472-byte region [ffff8880915107c0, ffff888091510998) The buggy address belongs to the page: page:ffffea0002454400 count:1 mapcount:0 mapping:ffff888091510040 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888091510040 0000000000000000 0000000100000006 raw: ffffea000258e220 ffffea00025aac60 ffff88821b7203c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091510680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091510700: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888091510780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888091510800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091510880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== audit: type=1400 audit(1568561280.903:39): avc: denied { map } for pid=6989 comm="syz-executor.2" path="/dev/loop0" dev="devtmpfs" ino=219 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file permissive=1 encrypted_key: key user:syz not found TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN kobject: 'tx-0' (ffff888094b4b598): kobject_uevent_env Modules linked in: CPU: 1 PID: 6947 Comm: syz-executor.4 Tainted: G B 4.14.143 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff88808c0386c0 task.stack: ffff88805f1e0000 RIP: 0010:skb_zcopy include/linux/skbuff.h:1277 [inline] RIP: 0010:skb_orphan_frags include/linux/skbuff.h:2575 [inline] RIP: 0010:skb_clone+0x9e/0x320 net/core/skbuff.c:1271 RSP: 0018:ffff88805f1e7930 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff84d07e85 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000003 RBP: ffff88805f1e7950 R08: 00000000c5dda758 R09: 0000000000000000 R10: 0000000000000000 R11: ffff88808c0386c0 R12: ffff888089665b00 R13: 0000000001080020 R14: dffffc0000000000 R15: ffff888089665b00 FS: 0000000001adb940(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000625208 CR3: 000000008a366000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __tcp_transmit_skb+0x1ec/0x2fe0 net/ipv4/tcp_output.c:1016 tcp_transmit_skb net/ipv4/tcp_output.c:1146 [inline] tcp_write_xmit+0x523/0x4960 net/ipv4/tcp_output.c:2382 __tcp_push_pending_frames+0xa6/0x260 net/ipv4/tcp_output.c:2563 tcp_send_fin+0x17e/0xc40 net/ipv4/tcp_output.c:3115 tcp_close+0xcc8/0xfb0 net/ipv4/tcp.c:2221 tls_sk_proto_close+0x157/0x750 net/tls/tls_main.c:295 inet_release+0xec/0x1c0 net/ipv4/af_inet.c:425 inet6_release+0x53/0x80 net/ipv6/af_inet6.c:450 __sock_release+0xce/0x2b0 net/socket.c:602 sock_close+0x1b/0x30 net/socket.c:1139 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 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+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4135d1 RSP: 002b:00007ffd7ddbf020 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000006 RCX: 00000000004135d1 RDX: 0000000000000000 RSI: 0000000000000081 RDI: 0000000000000005 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffffffffff R10: 00000000007607b8 R11: 0000000000000293 R12: 000000000075bfc8 R13: 0000000000000002 R14: 00000000007607c8 R15: ffffffffffffffff Code: 48 c1 ea 03 80 3c 02 00 0f 85 7f 02 00 00 49 03 9c 24 d0 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b kobject: 'tx-0' (ffff888094b4b598): fill_kobj_path: path = '/devices/virtual/net/bridge1/queues/tx-0' 03 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 kobject: 'brif' (ffff8880a87bde80): kobject_add_internal: parent: 'bridge1', set: '' 07 38 d0 7f 08 84 c0 0f 85 21 02 00 RIP: skb_zcopy include/linux/skbuff.h:1277 [inline] RSP: ffff88805f1e7930 RIP: skb_orphan_frags include/linux/skbuff.h:2575 [inline] RSP: ffff88805f1e7930 RIP: skb_clone+0x9e/0x320 net/core/skbuff.c:1271 RSP: ffff88805f1e7930 encrypted_key: key user:syz not found kobject: 'batman_adv' (ffff8880a87bdc00): kobject_add_internal: parent: 'bridge1', set: '' kobject: 'loop0' (ffff8880a49076a0): kobject_uevent_env kobject: 'brif' (ffff8880a87bde80): kobject_cleanup, parent ffff88805ebd5570 kobject: 'loop0' (ffff8880a49076a0): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'brif' (ffff8880a87bde80): auto cleanup kobject_del kobject: 'loop2' (ffff8880a49b2ee0): kobject_uevent_env kobject: 'brif' (ffff8880a87bde80): calling ktype release kobject: 'loop2' (ffff8880a49b2ee0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: (ffff8880a87bde80): dynamic_kobj_release ---[ end trace b23a2c245574130f ]--- audit: type=1804 audit(1568561281.773:40): pid=6991 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir007663451/syzkaller.LOus4P/3/bus" dev="sda1" ino=16551 res=1