audit: type=1400 audit(1543714050.838:33): avc: denied { write } for pid=10697 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 ================================================================== 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 ffff8800b2e40530 by task syz-executor2/10715 audit: type=1400 audit(1543714051.168:34): avc: denied { read } for pid=10702 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1543714051.168:35): avc: denied { create } for pid=10702 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 netlink: 76 bytes leftover after parsing attributes in process `syz-executor1'. audit: type=1400 audit(1543714051.168:36): avc: denied { write } for pid=10702 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1543714051.168:37): avc: denied { read } for pid=10697 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 CPU: 0 PID: 10715 Comm: syz-executor2 Not tainted 4.4.166+ #4 0000000000000000 5509ee9117fa29b1 ffff8801db6074e0 ffffffff81aa62ad ffffea0002cb9000 ffff8800b2e40530 0000000000000000 ffff8800b2e40530 dffffc0000000000 ffff8801db607518 ffffffff8148b12b ffff8800b2e40530 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_push_pending_frames include/net/tcp.h:1585 [inline] [] tcp_data_snd_check net/ipv4/tcp_input.c:5075 [inline] [] tcp_rcv_state_process+0xb02/0x4180 net/ipv4/tcp_input.c:6130 [] tcp_v4_do_rcv+0x1a5/0x7a0 net/ipv4/tcp_ipv4.c:1421 [] tcp_v4_rcv+0x2a84/0x3750 net/ipv4/tcp_ipv4.c:1680 [] ip_local_deliver_finish+0x3c0/0xa70 net/ipv4/ip_input.c:216 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip_local_deliver+0x1ac/0x390 net/ipv4/ip_input.c:257 [] dst_input include/net/dst.h:504 [inline] [] ip_rcv_finish+0x759/0x1220 net/ipv4/ip_input.c:365 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip_rcv+0x899/0xfc0 net/ipv4/ip_input.c:455 [] __netif_receive_skb_core+0x12c8/0x2820 net/core/dev.c:4041 [] __netif_receive_skb+0x5b/0x1c0 net/core/dev.c:4076 [] process_backlog+0x20a/0x670 net/core/dev.c:4673 [] napi_poll net/core/dev.c:4911 [inline] [] net_rx_action+0x367/0xd50 net/core/dev.c:4976 [] __do_softirq+0x22a/0xa3e kernel/softirq.c:273 [] do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:956 [] do_softirq.part.2+0x54/0x60 kernel/softirq.c:317 [] do_softirq kernel/softirq.c:309 [inline] [] __local_bh_enable_ip+0xd4/0xe0 kernel/softirq.c:170 [] __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:178 [inline] [] _raw_spin_unlock_bh+0x30/0x40 kernel/locking/spinlock.c:207 [] spin_unlock_bh include/linux/spinlock.h:352 [inline] [] release_sock+0x3b6/0x500 net/core/sock.c:2484 [] inet_wait_for_connect net/ipv4/af_inet.c:567 [inline] [] __inet_stream_connect+0x5aa/0xc30 net/ipv4/af_inet.c:637 [] tcp_sendmsg_fastopen net/ipv4/tcp.c:1092 [inline] [] tcp_sendmsg+0x1a07/0x2b30 net/ipv4/tcp.c:1112 [] 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 [] entry_SYSCALL_64_fastpath+0x1e/0x9a Allocated by task 10700: [] 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 [] entry_SYSCALL_64_fastpath+0x1e/0x9a Freed by task 10715: [] 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/0x350 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 [] tcp_sendmsg_fastopen net/ipv4/tcp.c:1092 [inline] [] tcp_sendmsg+0x1a07/0x2b30 net/ipv4/tcp.c:1112 [] 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 [] entry_SYSCALL_64_fastpath+0x1e/0x9a The buggy address belongs to the object at ffff8800b2e40500 which belongs to the cache skbuff_fclone_cache of size 456 The buggy address is located 48 bytes inside of 456-byte region [ffff8800b2e40500, ffff8800b2e406c8) The buggy address belongs to the page: Initializing cgroup subsys cpu Initializing cgroup subsys cpuacct Linux version 4.4.166+ (syzkaller@ci) (gcc version 8.0.1 20180413 (experimental) (GCC) ) #4 SMP PREEMPT Sat Dec 1 09:28:46 UTC 2018 Command line: BOOT_IMAGE=/vmlinuz root=/dev/sda1 console=ttyS0 earlyprintk=serial vsyscall=native rodata=n oops=panic panic_on_warn=1 nmi_watchdog=panic panic=86400 workqueue.watchdog_thresh=140 nopti KERNEL supported cpus: Intel GenuineIntel AMD AuthenticAMD x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers' x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers' x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers' x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format. e820: BIOS-provided physical RAM map: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved BIOS-e820: [mem 0x0000000000100000-0x00000000bfffcfff] usable BIOS-e820: [mem 0x00000000bfffd000-0x00000000bfffffff] reserved BIOS-e820: [mem 0x00000000fffbc000-0x00000000ffffffff] reserved BIOS-e820: [mem 0x0000000100000000-0x000000021fffffff] usable bootconsole [earlyser0] enabled NX (Execute Disable) protection: active Hypervisor detected: KVM Kernel/User page tables isolation: disabled e820: last_pfn = 0x220000 max_arch_pfn = 0x400000000 x86/PAT: Configuration [0-7]: WB WC UC- UC UC UC UC UC e820: last_pfn = 0xbfffd max_arch_pfn = 0x400000000 found SMP MP-table at [mem 0x000f2c80-0x000f2c8f] mapped at [ffff8800000f2c80] Using GB pages for direct mapping ACPI: Early table checksum verification disabled ACPI: RSDP 0x00000000000F2A50 000014 (v00 Google) ACPI: RSDT 0x00000000BFFFDBA0 000038 (v01 Google GOOGRSDT 00000001 GOOG 00000001) ACPI: FACP 0x00000000BFFFFF00 0000F4 (v02 Google GOOGFACP 00000001 GOOG 00000001) ACPI: DSDT 0x00000000BFFFDBE0 0017B2 (v01 Google GOOGDSDT 00000001 GOOG 00000001) ACPI: FACS 0x00000000BFFFFEC0 000040 ACPI: FACS 0x00000000BFFFFEC0 000040 ACPI: SSDT 0x00000000BFFFF590 000930 (v01 Google GOOGSSDT 00000001 GOOG 00000001) ACPI: APIC 0x00000000BFFFF4A0 000076 (v01 Google GOOGAPIC 00000001 GOOG 00000001) ACPI: WAET 0x00000000BFFFF470 000028 (v01 Google GOOGWAET 00000001 GOOG 00000001) ACPI: SRAT 0x00000000BFFFF3A0 0000C8 (v01 Google GOOGSRAT 00000001 GOOG 00000001) kvm-clock: Using msrs 4b564d01 and 4b564d00 kvm-clock: cpu 0, msr 2:1fffd001, primary cpu clock kvm-clock: using sched offset of 1630382414 cycles clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns Zone ranges: DMA32 [mem 0x0000000000001000-0x00000000ffffffff] Normal [mem 0x0000000100000000-0x000000021fffffff] Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000000001000-0x000000000009efff] node 0: [mem 0x0000000000100000-0x00000000bfffcfff] node 0: [mem 0x0000000100000000-0x000000021fffffff] Initmem setup node 0 [mem 0x0000000000001000-0x000000021fffffff] kasan: KernelAddressSanitizer initialized ACPI: PM-Timer IO Port: 0xb008 ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1]) IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23 ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level) ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level) Using ACPI (MADT) for SMP configuration information smpboot: Allowing 2 CPUs, 0 hotplug CPUs e820: [mem 0xc0000000-0xfffbbfff] available for PCI devices Booting paravirtualized kernel on KVM clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1 PERCPU: Embedded 41 pages/cpu @ffff8801db600000 s130696 r8192 d29048 u1048576 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 1935238 Kernel command line: BOOT_IMAGE=/vmlinuz root=/dev/sda1 console=ttyS0 earlyprintk=serial vsyscall=native rodata=n oops=panic panic_on_warn=1 nmi_watchdog=panic panic=86400 workqueue.watchdog_thresh=140 nopti PID hash table entries: 4096 (order: 3, 32768 bytes) Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes) Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes) Memory: 6609220K/7863916K available (23659K kernel code, 3782K rwdata, 5032K rodata, 1300K init, 23352K bss, 1254696K reserved, 0K cma-reserved) SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 Running RCU self tests Preemptible hierarchical RCU implementation. RCU lockdep checking is enabled. Build-time adjustment of leaf fanout to 64. RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2. RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=2 NR_IRQS:4352 nr_irqs:440 16 console [ttyS0] enabled console [ttyS0] enabled bootconsole [earlyser0] disabled bootconsole [earlyser0] disabled Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar ... MAX_LOCKDEP_SUBCLASSES: 8 ... MAX_LOCK_DEPTH: 48 ... MAX_LOCKDEP_KEYS: 8191 ... CLASSHASH_SIZE: 4096 ... MAX_LOCKDEP_ENTRIES: 32768 ... MAX_LOCKDEP_CHAINS: 65536 ... CHAINHASH_SIZE: 32768 memory used by lock dependency info: 8159 kB per task-struct memory footprint: 1920 bytes tsc: Detected 2300.000 MHz processor Calibrating delay loop (skipped) preset value.. 4600.00 BogoMIPS (lpj=23000000) pid_max: default: 32768 minimum: 301 ACPI: Core revision 20150930 ACPI: 2 ACPI AML tables successfully acquired and loaded Security Framework initialized SELinux: Initializing. Mount-cache hash table entries: 16384 (order: 5, 131072 bytes) Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes) Initializing cgroup subsys freezer CPU: Physical Processor ID: 0 Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024 Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4 Spectre V2 : Mitigation: Full generic retpoline Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch Speculative Store Bypass: Vulnerable Freeing SMP alternatives memory: 28K ..TIMER: vector=0x30 apic1=0 pin1=0 apic2=-1 pin2=-1 smpboot: CPU0: Intel(R) Xeon(R) CPU @ 2.30GHz (family: 0x6, model: 0x3f, stepping: 0x0) Performance Events: unsupported p6 CPU model 63 no PMU driver, software events only. x86: Booting SMP configuration: .... node #0, CPUs: #1 kvm-clock: cpu 1, msr 2:1fffd041, secondary cpu clock x86: Booted up 1 node, 2 CPUs smpboot: Total of 2 processors activated (9200.00 BogoMIPS) CPU1: update max cpu_capacity 1024 CPU1: update max cpu_capacity 1024 devtmpfs: initialized clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 512 (order: 4, 65536 bytes) NET: Registered protocol family 16 cpuidle: using governor ladder cpuidle: using governor menu ACPI: bus type PCI registered PCI: Using configuration type 1 for base access ACPI: Added _OSI(Module Device) ACPI: Added _OSI(Processor Device) ACPI: Added _OSI(3.0 _SCP Extensions) ACPI: Added _OSI(Processor Aggregator Device) ACPI: Executed 2 blocks of module-level executable AML code ACPI: Interpreter enabled ACPI: (supports S0 S3 S5) ACPI: Using IOAPIC for interrupt routing PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) acpi PNP0A03:00: _OSC: OS supports [Segments MSI] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff window] pci_bus 0000:00: root bus resource [bus 00-ff] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) ACPI: PCI Interrupt Link [LNKS] (IRQs *9) ACPI: Enabled 16 GPEs in block 00 to 0F vgaarb: loaded SCSI subsystem initialized ACPI: bus type USB registered usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Advanced Linux Sound Architecture Driver Initialized. PCI: Using ACPI for IRQ routing amd_nb: Cannot enumerate AMD northbridges clocksource: Switched to clocksource kvm-clock pnp: PnP ACPI init pnp: PnP ACPI: found 7 devices clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns NET: Registered protocol family 2 TCP established hash table entries: 65536 (order: 7, 524288 bytes) TCP bind hash table entries: 65536 (order: 10, 4194304 bytes) TCP: Hash tables configured (established 65536 bind 65536) UDP hash table entries: 4096 (order: 7, 655360 bytes) UDP-Lite hash table entries: 4096 (order: 7, 655360 bytes) NET: Registered protocol family 1 pci 0000:00:00.0: Limiting direct PCI/PCI transfers PCI-DMA: Using software bounce buffering for IO (SWIOTLB) software IO TLB [mem 0xbbffd000-0xbfffd000] (64MB) mapped at [ffff8800bbffd000-ffff8800bfffcfff] RAPL PMU detected, API unit is 2^-32 Joules, 3 fixed counters 10737418240 ms ovfl timer hw unit of domain pp0-core 2^-0 Joules hw unit of domain package 2^-0 Joules hw unit of domain dram 2^-16 Joules audit: initializing netlink subsys (disabled) audit: type=2000 audit(1543714060.175:1): initialized VFS: Disk quotas dquot_6.6.0 VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) Registering sdcardfs 0.1 fuse init (API version 7.23) cryptomgr_test (31) used greatest stack depth: 28656 bytes left Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 ACPI: Power Button [PWRF] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1 ACPI: Sleep Button [SLPF] Warning: Processor Platform Limit event detected, but not handled. Consider compiling CPUfreq support into your kernel. ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11 virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10 virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A 00:05: ttyS2 at I/O 0x3e8 (irq = 6, base_baud = 115200) is a 16550A 00:06: ttyS3 at I/O 0x2e8 (irq = 7, base_baud = 115200) is a 16550A brd: module loaded loop: module loaded scsi host0: Virtio SCSI HBA scsi 0:0:1:0: Direct-Access Google PersistentDisk 1 PQ: 0 ANSI: 6