syzbot


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

Status: auto-closed as invalid on 2019/02/22 13:29
First crash: 2531d, last: 2491d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 KASAN: slab-out-of-bounds Read in __lock_acquire C 51 2484d 2573d 0/3 closed as invalid on 2018/04/25 21:49

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x387e/0x4b50 kernel/locking/lockdep.c:3092
Read of size 8 at addr ffff8800bbb760f8 by task syz-executor6/21757

CPU: 0 PID: 21757 Comm: syz-executor6 Not tainted 4.4.106-g1700518 #9
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 0000000000000000 3264d890a3f808ab ffff8801d3ff7850 ffffffff81d02f7d
 ffffea0002eedd80 ffff8800bbb760f8 0000000000000000 ffff8800bbb760f8
 0000000000000000 ffff8801d3ff7888 ffffffff814fa843 ffff8800bbb760f8
Call Trace:
 [<ffffffff81d02f7d>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d02f7d>] dump_stack+0xc1/0x124 lib/dump_stack.c:51
 [<ffffffff814fa843>] print_address_description+0x73/0x260 mm/kasan/report.c:252
 [<ffffffff814fad55>] kasan_report_error mm/kasan/report.c:351 [inline]
 [<ffffffff814fad55>] kasan_report+0x285/0x370 mm/kasan/report.c:408
 [<ffffffff814faeb4>] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429
 [<ffffffff81236eae>] __lock_acquire+0x387e/0x4b50 kernel/locking/lockdep.c:3092
 [<ffffffff812399ee>] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592
 [<ffffffff8376ec1e>] __raw_write_lock_irqsave include/linux/rwlock_api_smp.h:186 [inline]
 [<ffffffff8376ec1e>] _raw_write_lock_irqsave+0x4e/0x70 kernel/locking/spinlock.c:303
 [<ffffffff825b3b19>] sg_remove_request+0x69/0x110 drivers/scsi/sg.c:2132
 [<ffffffff825b4125>] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1848
 [<ffffffff825b5f61>] sg_read+0xa21/0x1490 drivers/scsi/sg.c:538
 [<ffffffff81519793>] __vfs_read+0x103/0x440 fs/read_write.c:432
 [<ffffffff8151b633>] vfs_read+0x123/0x3a0 fs/read_write.c:454
 [<ffffffff8151df79>] SYSC_read fs/read_write.c:569 [inline]
 [<ffffffff8151df79>] SyS_read+0xd9/0x1b0 fs/read_write.c:562
 [<ffffffff8376ef36>] entry_SYSCALL_64_fastpath+0x16/0x76

Allocated by task 21757:
 [<ffffffff81035c86>] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63
 [<ffffffff814f98b3>] save_stack+0x43/0xd0 mm/kasan/kasan.c:512
 [<ffffffff814f9b7d>] set_track mm/kasan/kasan.c:524 [inline]
 [<ffffffff814f9b7d>] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616
 [<ffffffff814fa152>] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:554
 [<ffffffff814f585a>] slab_post_alloc_hook mm/slub.c:1349 [inline]
 [<ffffffff814f585a>] slab_alloc_node mm/slub.c:2615 [inline]
 [<ffffffff814f585a>] slab_alloc mm/slub.c:2623 [inline]
 [<ffffffff814f585a>] kmem_cache_alloc+0xba/0x290 mm/slub.c:2628
 [<ffffffff81556227>] fasync_alloc fs/fcntl.c:603 [inline]
 [<ffffffff81556227>] fasync_add_entry fs/fcntl.c:661 [inline]
 [<ffffffff81556227>] fasync_helper+0x37/0xb0 fs/fcntl.c:690
 [<ffffffff825b2836>] sg_fasync+0x86/0xb0 drivers/scsi/sg.c:1213
 [<ffffffff81554bdf>] setfl fs/fcntl.c:69 [inline]
 [<ffffffff81554bdf>] do_fcntl fs/fcntl.c:266 [inline]
 [<ffffffff81554bdf>] SYSC_fcntl fs/fcntl.c:371 [inline]
 [<ffffffff81554bdf>] SyS_fcntl+0x64f/0xc40 fs/fcntl.c:356
 [<ffffffff8376ef36>] entry_SYSCALL_64_fastpath+0x16/0x76

Freed by task 6430:
 [<ffffffff81035c86>] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63
 [<ffffffff814f98b3>] save_stack+0x43/0xd0 mm/kasan/kasan.c:512
 [<ffffffff814fa1d2>] set_track mm/kasan/kasan.c:524 [inline]
 [<ffffffff814fa1d2>] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589
 [<ffffffff814f6912>] slab_free_hook mm/slub.c:1383 [inline]
 [<ffffffff814f6912>] slab_free_freelist_hook mm/slub.c:1405 [inline]
 [<ffffffff814f6912>] slab_free mm/slub.c:2859 [inline]
 [<ffffffff814f6912>] kmem_cache_free+0xb2/0x310 mm/slub.c:2881
 [<ffffffff81553dcd>] fasync_free_rcu+0x1d/0x20 fs/fcntl.c:562
 [<ffffffff812911af>] __rcu_reclaim kernel/rcu/rcu.h:118 [inline]
 [<ffffffff812911af>] rcu_do_batch kernel/rcu/tree.c:2705 [inline]
 [<ffffffff812911af>] invoke_rcu_callbacks kernel/rcu/tree.c:2973 [inline]
 [<ffffffff812911af>] __rcu_process_callbacks kernel/rcu/tree.c:2940 [inline]
 [<ffffffff812911af>] rcu_process_callbacks+0x7ff/0x1490 kernel/rcu/tree.c:2957
 [<ffffffff8377208d>] __do_softirq+0x24d/0xa59 kernel/softirq.c:273

The buggy address belongs to the object at ffff8800bbb76080
 which belongs to the cache fasync_cache of size 96
The buggy address is located 24 bytes to the right of
 96-byte region [ffff8800bbb76080, ffff8800bbb760e0)
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
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.106-g1700518 #9
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8801da6917c0 task.stack: ffff8801da6a0000
RIP: 0010:[<ffffffff81d140af>]  [<ffffffff81d140af>] __rb_insert lib/rbtree.c:120 [inline]
RIP: 0010:[<ffffffff81d140af>]  [<ffffffff81d140af>] rb_insert_color+0x9f/0xcb0 lib/rbtree.c:420
RSP: 0018:ffff8801db507d18  EFLAGS: 00010003
RAX: 0a0508a8e82a0be9 RBX: ffffffff838a7e20 RCX: ffffffff838a7e20
RDX: 1ffffffff0714fc5 RSI: ffff8801db516f10 RDI: ffff8801db517440
RBP: ffff8801db507d60 R08: 0000000000000001 R09: ffffffff850b9250
R10: 0000000000000001 R11: 1ffff1003b6a0f86 R12: ffff8801d0ee7b18
R13: 5028454741505f4e R14: ffff8801db517440 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8801db500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f44dcff2db8 CR3: 000000000420b000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 ffffffff842b7540 ffff8801da692030 0000000000000000 ffff8801db507d70
 ffff8801db517440 dffffc0000000000 0000000000000000 ffff8801db516f10
 ffff8801d0ee7b20 ffff8801db507db0 ffffffff81d20847 ffff8801db517458
Call Trace:
 <IRQ> 
 [<ffffffff81d20847>] timerqueue_add+0x157/0x2a0 lib/timerqueue.c:57
 [<ffffffff812a7459>] enqueue_hrtimer+0x159/0x440 kernel/time/hrtimer.c:890
 [<ffffffff812a9413>] __run_hrtimer kernel/time/hrtimer.c:1268 [inline]
 [<ffffffff812a9413>] __hrtimer_run_queues+0x723/0xfd0 kernel/time/hrtimer.c:1317
 [<ffffffff812ab816>] hrtimer_interrupt+0x1a6/0x440 kernel/time/hrtimer.c:1351
 [<ffffffff810b023a>] local_apic_timer_interrupt+0x6a/0xb0 arch/x86/kernel/apic/apic.c:901
 [<ffffffff837717c6>] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:925
 [<ffffffff8377086c>] apic_timer_interrupt+0x8c/0xa0 arch/x86/entry/entry_64.S:695
 <EOI> 
 [<ffffffff81027d75>] arch_safe_halt arch/x86/include/asm/paravirt.h:117 [inline]
 [<ffffffff81027d75>] default_idle+0x55/0x3c0 arch/x86/kernel/process.c:291
 [<ffffffff810292ea>] arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:282
 [<ffffffff8121d708>] default_idle_call+0x48/0x70 kernel/sched/idle.c:93
 [<ffffffff8121de15>] cpuidle_idle_call kernel/sched/idle.c:157 [inline]
 [<ffffffff8121de15>] cpu_idle_loop kernel/sched/idle.c:253 [inline]
 [<ffffffff8121de15>] cpu_startup_entry+0x605/0x820 kernel/sched/idle.c:301
 [<ffffffff810ad2e4>] start_secondary+0x304/0x3e0 arch/x86/kernel/smpboot.c:251
Code: 48 89 c2 48 c1 ea 03 42 80 3c 3a 00 0f 85 94 09 00 00 4c 8b 6b 08 4d 39 e5 0f 84 b0 01 00 00 4d 85 ed 74 1d 4c 89 e8 48 c1 e8 03 <42> 80 3c 38 00 0f 85 95 09 00 00 41 f6 45 00 01 0f 84 20 03 00 
RIP  [<ffffffff81d140af>] __rb_insert lib/rbtree.c:120 [inline]
RIP  [<ffffffff81d140af>] rb_insert_color+0x9f/0xcb0 lib/rbtree.c:420
 RSP <ffff8801db507d18>
---[ end trace c4e154818b8de479 ]---

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/12/19 08:35 https://android.googlesource.com/kernel/common android-4.4 170051828437 1c4160ef .config console log report ci-android-44-kasan-gce
2017/12/17 12:15 https://android.googlesource.com/kernel/common android-4.4 dcfa5fe36a67 d5beb42a .config console log report ci-android-44-kasan-gce
2018/01/26 15:21 https://android.googlesource.com/kernel/common android-4.4 e70c132b2dac 1d18b112 .config console log report ci-android-44-kasan-gce-386
* Struck through repros no longer work on HEAD.