syzbot


android-4.9 boot error: general protection fault in corrupted

Status: auto-closed as invalid on 2019/09/09 22:56
Reported-by: syzbot+f43381386f68d865cbf9@syzkaller.appspotmail.com
First crash: 2107d, last: 2082d

Sample crash report:
usbhid: USB HID core driver
ion_heap_create: Heap type is disabled: 1
kasan: CONFIG_KASAN_INLINE enabled
sd 0:0:1:0: [sda] Attached SCSI disk
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.162+ #11
task: ffff8801da5f8000 task.stack: ffff8801da600000
==================================================================
BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline]
BUG: KASAN: use-after-free in do_raw_spin_lock+0x1a5/0x1e0 kernel/locking/spinlock_debug.c:112
Read of size 4 at addr ffff8801d672d4b4 by task system/348

CPU: 1 PID: 348 Comm: system Not tainted 4.9.162+ #11
 ffff8801d5ca7bc8 ffffffff81b483c1 0000000000000000 ffffea000759cb00
 ffff8801d672d4b4 0000000000000004 ffffffff81215865 ffff8801d5ca7c00
 ffffffff815033b5 0000000000000000 ffff8801d672d4b4 ffff8801d672d4b4
Call Trace:
 [<ffffffff81b483c1>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81b483c1>] dump_stack+0xc1/0x120 lib/dump_stack.c:51
 [<ffffffff815033b5>] print_address_description+0x6f/0x238 mm/kasan/report.c:256
 [<ffffffff8150360a>] kasan_report_error mm/kasan/report.c:355 [inline]
 [<ffffffff8150360a>] kasan_report mm/kasan/report.c:412 [inline]
 [<ffffffff8150360a>] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:397
 [<ffffffff814f57e4>] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432
 [<ffffffff81215865>] debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline]
 [<ffffffff81215865>] do_raw_spin_lock+0x1a5/0x1e0 kernel/locking/spinlock_debug.c:112
 [<ffffffff82805b50>] __raw_spin_lock include/linux/spinlock_api_smp.h:145 [inline]
 [<ffffffff82805b50>] _raw_spin_lock+0x40/0x50 kernel/locking/spinlock.c:151
 [<ffffffff821e6f89>] spin_lock include/linux/spinlock.h:302 [inline]
 [<ffffffff821e6f89>] ion_heap_freelist_size drivers/staging/android/ion/ion_heap.c:176 [inline]
 [<ffffffff821e6f89>] ion_heap_deferred_free+0xf9/0x560 drivers/staging/android/ion/ion_heap.c:232
 [<ffffffff81142838>] kthread+0x278/0x310 kernel/kthread.c:211
 [<ffffffff8280699c>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:373

Allocated by task 1:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
 save_stack mm/kasan/kasan.c:505 [inline]
 set_track mm/kasan/kasan.c:517 [inline]
 kasan_kmalloc.part.0+0x62/0xf0 mm/kasan/kasan.c:609
 kasan_kmalloc+0xb7/0xd0 mm/kasan/kasan.c:594
 kmem_cache_alloc_trace+0x115/0x2d0 mm/slub.c:2742
 kmalloc include/linux/slab.h:490 [inline]
 kzalloc include/linux/slab.h:636 [inline]
 ion_system_heap_create+0x42/0x1c0 drivers/staging/android/ion/ion_system_heap.c:334
 ion_heap_create+0x156/0x1b0 drivers/staging/android/ion/ion_heap.c:328
 ion_dummy_init+0x22e/0x3b6 drivers/staging/android/ion/ion_dummy_driver.c:108
 do_one_initcall+0xb1/0x1c0 init/main.c:780
 do_initcall_level init/main.c:846 [inline]
 do_initcalls init/main.c:854 [inline]
 do_basic_setup init/main.c:872 [inline]
 kernel_init_freeable+0x2ff/0x3c3 init/main.c:1018
 kernel_init+0x12/0x163 init/main.c:946
 ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:373

Freed by task 1:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
 save_stack mm/kasan/kasan.c:505 [inline]
 set_track mm/kasan/kasan.c:517 [inline]
 kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:582
 slab_free_hook mm/slub.c:1355 [inline]
 slab_free_freelist_hook mm/slub.c:1377 [inline]
 slab_free mm/slub.c:2958 [inline]
 kfree+0xfb/0x310 mm/slub.c:3878
 ion_system_heap_destroy+0x72/0x90 drivers/staging/android/ion/ion_system_heap.c:369
 ion_heap_destroy+0x6a/0xd0 drivers/staging/android/ion/ion_heap.c:369
 ion_dummy_init+0x30a/0x3b6 drivers/staging/android/ion/ion_dummy_driver.c:118
 do_one_initcall+0xb1/0x1c0 init/main.c:780
 do_initcall_level init/main.c:846 [inline]
 do_initcalls init/main.c:854 [inline]
 do_basic_setup init/main.c:872 [inline]
 kernel_init_freeable+0x2ff/0x3c3 init/main.c:1018
 kernel_init+0x12/0x163 init/main.c:946
 ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:373

The buggy address belongs to the object at ffff8801d672d400
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 180 bytes inside of
 512-byte region [ffff8801d672d400, ffff8801d672d600)
The buggy address belongs to the page:
page:ffffea000759cb00 count:1 mapcount:0 mapping:          (null) index:0x0 compound_mapcount: 0
flags: 0x4000000000004080(slab|head)
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801d672d380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8801d672d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8801d672d480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff8801d672d500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8801d672d580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/07 02:16 https://android.googlesource.com/kernel/common android-4.9 2f0bc4bcd59e 18215b8d .config console log report ci-android-49-kasan-gce-root
2019/03/07 00:07 https://android.googlesource.com/kernel/common android-4.9 9cca4066aa2a 18215b8d .config console log report ci-android-49-kasan-gce
2019/03/06 21:07 https://android.googlesource.com/kernel/common android-4.9 3a8e785fdd04 18215b8d .config console log report ci-android-49-kasan-gce
2019/03/06 18:48 https://android.googlesource.com/kernel/common android-4.9 3a8e785fdd04 05cf83bf .config console log report ci-android-49-kasan-gce-root
2019/03/05 22:37 https://android.googlesource.com/kernel/common android-4.9 f5f87ecac1cf 16559f86 .config console log report ci-android-49-kasan-gce
2019/02/16 01:43 https://android.googlesource.com/kernel/common android-4.9 3de7f8451928 f42dee6d .config console log report ci-android-49-kasan-gce-root
2019/03/13 22:55 https://android.googlesource.com/kernel/common android-4.9 429c144a84c6 2881fc25 .config console log report ci-android-49-kasan-gce-386
2019/03/01 06:17 https://android.googlesource.com/kernel/common android-4.9 8d9fb6b4b190 8a4b3a6b .config console log report ci-android-49-kasan-gce-386
* Struck through repros no longer work on HEAD.