KASAN: slab-out-of-bounds Read in __dev_queue_xmit

12 views
Skip to first unread message

syzbot

unread,
Apr 13, 2019, 8:00:39 PM4/13/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7902639f
git tree: android-4.4
console output: https://syzkaller.appspot.com/x/log.txt?x=163ffec9800000
kernel config: https://syzkaller.appspot.com/x/.config?x=44509e3077d6939
dashboard link: https://syzkaller.appspot.com/bug?extid=3166c375d92d95115371
compiler: gcc (GCC) 7.1.1 20170620
userspace arch: i386
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16404e39800000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17fccc09800000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+3166c3...@syzkaller.appspotmail.com

device syz0 entered promiscuous mode
==================================================================
BUG: KASAN: slab-out-of-bounds in tcp_hdrlen include/linux/tcp.h:34 [inline]
BUG: KASAN: slab-out-of-bounds in qdisc_pkt_len_init net/core/dev.c:2893
[inline]
BUG: KASAN: slab-out-of-bounds in __dev_xmit_skb net/core/dev.c:2913
[inline]
BUG: KASAN: slab-out-of-bounds in __dev_queue_xmit+0x14a8/0x1a70
net/core/dev.c:3157
Read of size 2 at addr ffff8800b453f5e0 by task syzkaller454851/3323

CPU: 0 PID: 3323 Comm: syzkaller454851 Not tainted 4.4.111-g7902639 #18
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
0000000000000000 1d3362570fe934dc ffff8800b445f718 ffffffff81d0509d
ffffea0002d14f00 ffff8800b453f5e0 0000000000000000 ffff8800b453f5e0
ffff8801d16ec000 ffff8800b445f750 ffffffff814fd433 ffff8800b453f5e0
Call Trace:
[<ffffffff81d0509d>] __dump_stack lib/dump_stack.c:15 [inline]
[<ffffffff81d0509d>] dump_stack+0xc1/0x124 lib/dump_stack.c:51
[<ffffffff814fd433>] print_address_description+0x73/0x260
mm/kasan/report.c:252
[<ffffffff814fd945>] kasan_report_error mm/kasan/report.c:351 [inline]
[<ffffffff814fd945>] kasan_report+0x285/0x370 mm/kasan/report.c:408
[<ffffffff814fda64>] __asan_report_load2_noabort+0x14/0x20
mm/kasan/report.c:427
[<ffffffff82e5b668>] tcp_hdrlen include/linux/tcp.h:34 [inline]
[<ffffffff82e5b668>] qdisc_pkt_len_init net/core/dev.c:2893 [inline]
[<ffffffff82e5b668>] __dev_xmit_skb net/core/dev.c:2913 [inline]
[<ffffffff82e5b668>] __dev_queue_xmit+0x14a8/0x1a70 net/core/dev.c:3157
[<ffffffff82e5bc47>] dev_queue_xmit+0x17/0x20 net/core/dev.c:3223
[<ffffffff83434692>] packet_snd net/packet/af_packet.c:2828 [inline]
[<ffffffff83434692>] packet_sendmsg+0x29b2/0x47e0
net/packet/af_packet.c:2853
[<ffffffff82ded98a>] sock_sendmsg_nosec net/socket.c:625 [inline]
[<ffffffff82ded98a>] sock_sendmsg+0xca/0x110 net/socket.c:635
[<ffffffff82dedbf6>] sock_write_iter+0x226/0x3b0 net/socket.c:834
[<ffffffff8151c9fc>] new_sync_write fs/read_write.c:478 [inline]
[<ffffffff8151c9fc>] __vfs_write+0x33c/0x450 fs/read_write.c:491
[<ffffffff8151e62a>] vfs_write+0x18a/0x530 fs/read_write.c:538
[<ffffffff81520d19>] SYSC_write fs/read_write.c:585 [inline]
[<ffffffff81520d19>] SyS_write+0xd9/0x1b0 fs/read_write.c:577
[<ffffffff81006d84>] do_syscall_32_irqs_on arch/x86/entry/common.c:390
[inline]
[<ffffffff81006d84>] do_fast_syscall_32+0x314/0x890
arch/x86/entry/common.c:457
[<ffffffff8377722a>] sysenter_flags_fixed+0xd/0x17

Allocated by task 3323:
[<ffffffff81035d26>] save_stack_trace+0x26/0x50
arch/x86/kernel/stacktrace.c:63
[<ffffffff814fc4a3>] save_stack+0x43/0xd0 mm/kasan/kasan.c:512
[<ffffffff814fc76d>] set_track mm/kasan/kasan.c:524 [inline]
[<ffffffff814fc76d>] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616
[<ffffffff814fcf44>] kasan_krealloc+0x64/0x80 mm/kasan/kasan.c:654
[<ffffffff814f5d32>] ksize+0x92/0xf0 mm/slub.c:3727
[<ffffffff82e08a92>] __alloc_skb+0x132/0x600 net/core/skbuff.c:237
[<ffffffff82e0900c>] alloc_skb include/linux/skbuff.h:815 [inline]
[<ffffffff82e0900c>] alloc_skb_with_frags+0xac/0x4f0 net/core/skbuff.c:4471
[<ffffffff82dfa609>] sock_alloc_send_pskb+0x5b9/0x740 net/core/sock.c:1885
[<ffffffff83433de4>] packet_alloc_skb net/packet/af_packet.c:2626 [inline]
[<ffffffff83433de4>] packet_snd net/packet/af_packet.c:2762 [inline]
[<ffffffff83433de4>] packet_sendmsg+0x2104/0x47e0
net/packet/af_packet.c:2853
[<ffffffff82ded98a>] sock_sendmsg_nosec net/socket.c:625 [inline]
[<ffffffff82ded98a>] sock_sendmsg+0xca/0x110 net/socket.c:635
[<ffffffff82dedbf6>] sock_write_iter+0x226/0x3b0 net/socket.c:834
[<ffffffff8151c9fc>] new_sync_write fs/read_write.c:478 [inline]
[<ffffffff8151c9fc>] __vfs_write+0x33c/0x450 fs/read_write.c:491
[<ffffffff8151e62a>] vfs_write+0x18a/0x530 fs/read_write.c:538
[<ffffffff81520d19>] SYSC_write fs/read_write.c:585 [inline]
[<ffffffff81520d19>] SyS_write+0xd9/0x1b0 fs/read_write.c:577
[<ffffffff81006d84>] do_syscall_32_irqs_on arch/x86/entry/common.c:390
[inline]
[<ffffffff81006d84>] do_fast_syscall_32+0x314/0x890
arch/x86/entry/common.c:457
[<ffffffff8377722a>] sysenter_flags_fixed+0xd/0x17

Freed by task 1816:
[<ffffffff81035d26>] save_stack_trace+0x26/0x50
arch/x86/kernel/stacktrace.c:63
[<ffffffff814fc4a3>] save_stack+0x43/0xd0 mm/kasan/kasan.c:512
[<ffffffff814fcdc2>] set_track mm/kasan/kasan.c:524 [inline]
[<ffffffff814fcdc2>] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589
[<ffffffff814f984c>] slab_free_hook mm/slub.c:1383 [inline]
[<ffffffff814f984c>] slab_free_freelist_hook mm/slub.c:1405 [inline]
[<ffffffff814f984c>] slab_free mm/slub.c:2859 [inline]
[<ffffffff814f984c>] kfree+0xfc/0x300 mm/slub.c:3749
[<ffffffff82e07a6d>] skb_free_head net/core/skbuff.c:571 [inline]
[<ffffffff82e07a6d>] skb_release_data+0x2ed/0x3b0 net/core/skbuff.c:602
[<ffffffff82e07b7a>] skb_release_all+0x4a/0x60 net/core/skbuff.c:661
[<ffffffff82e08183>] __kfree_skb net/core/skbuff.c:675 [inline]
[<ffffffff82e08183>] consume_skb+0xf3/0x3d0 net/core/skbuff.c:748
[<ffffffff82e2525a>] skb_free_datagram+0x1a/0xe0 net/core/datagram.c:280
[<ffffffff82f8307b>] netlink_recvmsg+0x60b/0xe10
net/netlink/af_netlink.c:1926
[<ffffffff82dea3bc>] sock_recvmsg_nosec net/socket.c:727 [inline]
[<ffffffff82dea3bc>] sock_recvmsg+0x8c/0xc0 net/socket.c:735
[<ffffffff82def8cd>] ___sys_recvmsg+0x26d/0x560 net/socket.c:2116
[<ffffffff82df1ad3>] __sys_recvmsg+0xd3/0x190 net/socket.c:2162
[<ffffffff82df1bbd>] SYSC_recvmsg net/socket.c:2174 [inline]
[<ffffffff82df1bbd>] SyS_recvmsg+0x2d/0x50 net/socket.c:2169
[<ffffffff83775899>] entry_SYSCALL_64_fastpath+0x16/0x92

The buggy address belongs to the object at ffff8800b453f180
which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 96 bytes to the right of
1024-byte region [ffff8800b453f180, ffff8800b453f580)
The buggy address belongs to the page:
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Initializing cgroup subsys schedtune
Linux version 4.4.111-g7902639 (syzkaller@ci) (gcc version 7.1.1 20170620
(GCC) ) #18 SMP PREEMPT Fri Jan 12 17:51:47 UTC 2018
Command line: BOOT_IMAGE=/vmlinuz root=/dev/sda1 console=ttyS0
earlyprintk=serial vsyscall=native rodata=n ftrace_dump_on_oops=orig_cpu
oops=panic panic_on_warn=1 nmi_watchdog=panic panic=86400
workqueue.watchdog_thresh=120
KERNEL supported cpus:
Intel GenuineIntel
AMD AuthenticAMD
Centaur CentaurHauls
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.
x86/fpu: Using 'eager' FPU context switches.
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
SMBIOS 2.4 present.
Hypervisor detected: KVM
e820: last_pfn = 0x220000 max_arch_pfn = 0x400000000
x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT
e820: last_pfn = 0xbfffd max_arch_pfn = 0x400000000
found SMP MP-table at [mem 0x000f32c0-0x000f32cf] mapped at
[ffff8800000f32c0]
Scanning 1 areas for low memory corruption
Using GB pages for direct mapping
ACPI: Early table checksum verification disabled
ACPI: RSDP 0x00000000000F3090 000014 (v00 Google)
ACPI: RSDT 0x00000000BFFFDC70 000034 (v01 Google GOOGRSDT 00000001 GOOG
00000001)
ACPI: FACP 0x00000000BFFFFF00 0000F4 (v02 Google GOOGFACP 00000001 GOOG
00000001)
ACPI: DSDT 0x00000000BFFFDCB0 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)
kvm-clock: Using msrs 4b564d01 and 4b564d00
kvm-clock: cpu 0, msr 2:1fffd001, primary cpu clock
kvm-clock: using sched offset of 1822124655 cycles
clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb,
max_idle_ns: 881590591483 ns
Zone ranges:
DMA [mem 0x0000000000001000-0x0000000000ffffff]
DMA32 [mem 0x0000000001000000-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
PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
PM: Registered nosave memory: [mem 0xbfffd000-0xbfffffff]
PM: Registered nosave memory: [mem 0xc0000000-0xfffbbfff]
PM: Registered nosave memory: [mem 0xfffbc000-0xffffffff]
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:64 nr_cpumask_bits:64 nr_cpu_ids:2 nr_node_ids:1
PERCPU: Embedded 42 pages/cpu @ffff8801db200000 s134024 r8192 d29816
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 ftrace_dump_on_oops=orig_cpu
oops=panic panic_on_warn=1 nmi_watchdog=panic panic=86400
workqueue.watchdog_thresh=120
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: 6581460K/7863916K available (40429K kernel code, 6130K rwdata,
8808K rodata, 1844K init, 23616K bss, 1282456K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Kernel/User page tables isolation: enabled
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=64 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.
AppArmor: AppArmor disabled by boot time parameter
Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)
Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)
Initializing cgroup subsys io
Initializing cgroup subsys freezer
Initializing cgroup subsys hugetlb
Initializing cgroup subsys debug
CPU: Physical Processor ID: 0
mce: CPU supports 32 MCE banks
Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024
Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4
Freeing SMP alternatives memory: 44K
..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)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns:
19112604462750000 ns
futex hash table entries: 512 (order: 4, 65536 bytes)
xor: automatically using best checksumming function:
kworker/u4:0 (21) used greatest stack depth: 27864 bytes left
avx : 21814.800 MB/sec
RTC time: 9:13:18, date: 01/14/18
NET: Registered protocol family 16
schedtune: init normalization constants...
schedtune: no energy model data
schedtune: disabled!
cpuidle: using governor ladder
cpuidle: using governor menu
ACPI: bus type PCI registered
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
PCI: Using configuration type 1 for base access
kworker/u4:0 (46) used greatest stack depth: 27224 bytes left
kworker/u4:1 (113) used greatest stack depth: 26984 bytes left
raid6: sse2x1 gen() 4743 MB/s
raid6: sse2x1 xor() 2461 MB/s
raid6: sse2x2 gen() 6984 MB/s
raid6: sse2x2 xor() 3947 MB/s
raid6: sse2x4 gen() 8603 MB/s
raid6: sse2x4 xor() 4702 MB/s
raid6: avx2x1 gen() 9333 MB/s
raid6: avx2x2 gen() 14656 MB/s
raid6: avx2x4 gen() 19018 MB/s
raid6: using algorithm avx2x4 gen() 19018 MB/s
raid6: using avx2x2 recovery algorithm
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 S4 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 [ASPM ClockPM Segments MSI]
acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended
PCI configuration space under this bridge.
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
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti
<giom...@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
PCI: Using ACPI for IRQ routing
NetLabel: Initializing
NetLabel: domain hash size = 128
NetLabel: protocols = UNLABELED CIPSOv4
NetLabel: unlabeled traffic allowed by default
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
Scanning for low memory corruption every 60 seconds
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(1515921201.217:1): initialized
HugeTLB registered 2 MB page size, pre-allocated 0 pages
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
fuse init (API version 7.23)
9p: Installing v9fs 9p2000 file system support
async_tx: api initialized (async)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
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]
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
Non-volatile memory driver v1.3
Linux agpgart interface v0.103
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
nbd: registered device at major 43
drbd: initialized. Version: 8.4.5 (api:1/proto:86-101)
drbd: built-in
drbd: registered as block device major 147
scsi host0: Virtio SCSI HBA
scsi 0:0:1:0: Direct-Access Google PersistentDisk 1 PQ: 0 ANSI: 6
tsc: Refined TSC clocksource calibration: 2299.928 MHz
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2126f13ec13,
max_idle_ns: 440795287760 ns
st: Version 20101219, fixed bufsize 32768, s/g segs 256
osst :I: Tape driver with OnStream support version 0.99.4
osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
sd 0:0:1:0: [sda] 4194304 512-byte logical blocks: (2.15 GB/2.00 GiB)
sd 0:0:1:0: [sda] 4096-byte physical blocks
sd 0:0:1:0: Attached scsi generic sg0 type 0
sd 0:0:1:0: [sda] Write Protect is off
SCSI Media Changer driver v0.25
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <ma...@qualcomm.com>
sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
sda: sda1
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
e1000: Copyright (c) 1999-2006 Intel Corporation.
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
sky2: driver version 1.30
sd 0:0:1:0: [sda] Attached SCSI disk
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
uhci_hcd: USB Universal Host Controller Interface driver
usbcore: registered new interface driver usblp
usbcore: registered new interface driver usb-storage
i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
i8042: Warning: Keylock active
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mousedev: PS/2 mouse device common for all mice
usbcore: registered new interface driver xpad
usbcore: registered new interface driver usb_acecad
usbcore: registered new interface driver aiptek
usbcore: registered new interface driver gtco
usbcore: registered new interface driver hanwang
usbcore: registered new interface driver kbtab
rtc_cmos 00:00: RTC can wake from S4
rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
rtc_cmos 00:00: alarms up to one day, 114 bytes nvram
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
softdog: Software Watchdog Timer: 0.08 initialized. soft_noboot=0
soft_margin=60 sec soft_panic=0 (nowayout=0)
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
md: multipath personality registered for level -4
md: faulty personality registered for level -5
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised:
dm-d...@redhat.com
device-mapper: multipath: version 1.10.0 loaded
device-mapper: multipath round-robin: version 1.0.0 loaded
device-mapper: multipath queue-length: version 0.1.0 loaded
device-mapper: multipath service-time: version 0.2.0 loaded
device-mapper: raid: Loading target version 1.7.0


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Apr 14, 2019, 4:51:24 AM4/14/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 8e170a58
git tree: android-4.9
console output: https://syzkaller.appspot.com/x/log.txt?x=100ccc09800000
kernel config: https://syzkaller.appspot.com/x/.config?x=4fadd453521adb
dashboard link: https://syzkaller.appspot.com/bug?extid=144706e2ef118de73217
compiler: gcc (GCC) 7.1.1 20170620
userspace arch: i386
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1503a719800000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1672c639800000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+144706...@syzkaller.appspotmail.com

device syz0 entered promiscuous mode
==================================================================
BUG: KASAN: slab-out-of-bounds in __tcp_hdrlen include/linux/tcp.h:35
[inline]
BUG: KASAN: slab-out-of-bounds in tcp_hdrlen include/linux/tcp.h:40 [inline]
BUG: KASAN: slab-out-of-bounds in qdisc_pkt_len_init net/core/dev.c:3087
[inline]
BUG: KASAN: slab-out-of-bounds in __dev_queue_xmit+0x1db6/0x1e60
net/core/dev.c:3369
Read of size 2 at addr ffff8801ca233a60 by task syzkaller440157/3345

CPU: 0 PID: 3345 Comm: syzkaller440157 Not tainted 4.9.76-g8e170a5 #21
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
ffff8801c8397688 ffffffff81d93149 ffffea0007288c00 ffff8801ca233a60
0000000000000000 ffff8801ca233a60 0000000000000005 ffff8801c83976c0
ffffffff8153cb43 ffff8801ca233a60 0000000000000002 0000000000000000
Call Trace:
[<ffffffff81d93149>] __dump_stack lib/dump_stack.c:15 [inline]
[<ffffffff81d93149>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
[<ffffffff8153cb43>] print_address_description+0x73/0x280
mm/kasan/report.c:252
[<ffffffff8153d065>] kasan_report_error mm/kasan/report.c:351 [inline]
[<ffffffff8153d065>] kasan_report+0x275/0x360 mm/kasan/report.c:408
[<ffffffff8153d184>] __asan_report_load2_noabort+0x14/0x20
mm/kasan/report.c:427
[<ffffffff82f4ad06>] __tcp_hdrlen include/linux/tcp.h:35 [inline]
[<ffffffff82f4ad06>] tcp_hdrlen include/linux/tcp.h:40 [inline]
[<ffffffff82f4ad06>] qdisc_pkt_len_init net/core/dev.c:3087 [inline]
[<ffffffff82f4ad06>] __dev_queue_xmit+0x1db6/0x1e60 net/core/dev.c:3369
[<ffffffff810002b8>] ? 0xffffffff810002b8
[<ffffffff82f4adc7>] dev_queue_xmit+0x17/0x20 net/core/dev.c:3458
[<ffffffff835571dc>] packet_snd net/packet/af_packet.c:2953 [inline]
[<ffffffff835571dc>] packet_sendmsg+0x2ccc/0x4760
net/packet/af_packet.c:2978
[<ffffffff82ed5baa>] sock_sendmsg_nosec net/socket.c:635 [inline]
[<ffffffff82ed5baa>] sock_sendmsg+0xca/0x110 net/socket.c:645
[<ffffffff82ed5e16>] sock_write_iter+0x226/0x3b0 net/socket.c:843
[<ffffffff8156d1ef>] new_sync_write fs/read_write.c:499 [inline]
[<ffffffff8156d1ef>] __vfs_write+0x4bf/0x680 fs/read_write.c:512
[<ffffffff8156eb19>] vfs_write+0x189/0x530 fs/read_write.c:560
[<ffffffff81572609>] SYSC_write fs/read_write.c:607 [inline]
[<ffffffff81572609>] SyS_write+0xd9/0x1b0 fs/read_write.c:599
[<ffffffff81006fc7>] do_syscall_32_irqs_on arch/x86/entry/common.c:322
[inline]
[<ffffffff81006fc7>] do_fast_syscall_32+0x2f7/0x890
arch/x86/entry/common.c:384
[<ffffffff838b2334>] entry_SYSENTER_compat+0x74/0x83
arch/x86/entry/entry_64_compat.S:127

Allocated by task 3345:
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
save_stack+0x43/0xd0 mm/kasan/kasan.c:505
set_track mm/kasan/kasan.c:517 [inline]
kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:609
kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:547
slab_post_alloc_hook mm/slab.h:417 [inline]
slab_alloc_node mm/slub.c:2715 [inline]
slab_alloc mm/slub.c:2723 [inline]
__kmalloc_track_caller+0xda/0x2b0 mm/slub.c:4232
__kmalloc_reserve.isra.37+0x33/0xc0 net/core/skbuff.c:138
__alloc_skb+0x119/0x600 net/core/skbuff.c:231
alloc_skb include/linux/skbuff.h:919 [inline]
alloc_skb_with_frags+0xac/0x4f0 net/core/skbuff.c:4657
sock_alloc_send_pskb+0x5ad/0x740 net/core/sock.c:1893
packet_alloc_skb net/packet/af_packet.c:2810 [inline]
packet_snd net/packet/af_packet.c:2901 [inline]
packet_sendmsg+0x18a1/0x4760 net/packet/af_packet.c:2978
sock_sendmsg_nosec net/socket.c:635 [inline]
sock_sendmsg+0xca/0x110 net/socket.c:645
sock_write_iter+0x226/0x3b0 net/socket.c:843
new_sync_write fs/read_write.c:499 [inline]
__vfs_write+0x4bf/0x680 fs/read_write.c:512
vfs_write+0x189/0x530 fs/read_write.c:560
SYSC_write fs/read_write.c:607 [inline]
SyS_write+0xd9/0x1b0 fs/read_write.c:599
do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline]
do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384
entry_SYSENTER_compat+0x74/0x83 arch/x86/entry/entry_64_compat.S:127

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8801ca233600
which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 96 bytes to the right of
1024-byte region [ffff8801ca233600, ffff8801ca233a00)
The buggy address belongs to the page:
page:ffffea0007288c00 count:1 mapcount:0 mapping: (null) index:0x0
compound_mapcount: 0
flags: 0x8000000000004080(slab|head)
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8801ca233900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8801ca233980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff8801ca233a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8801ca233a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8801ca233b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
Reply all
Reply to author
Forward
0 new messages