syzbot


KASAN: stack-out-of-bounds Write in i801_isr

Status: auto-closed as invalid on 2021/03/18 06:45
Subsystems: i2c
[Documentation on labels]
Reported-by: syzbot+c8ff0b6d6c73d81b610e@syzkaller.appspotmail.com
First crash: 1548d, last: 1464d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 5.10 000/252] 5.10.42-rc1 review 268 (268) 2021/07/29 07:58
[PATCH 5.12 000/296] 5.12.9-rc1 review 303 (303) 2021/06/02 02:25
[PATCH 5.4 000/177] 5.4.124-rc1 review 185 (185) 2021/06/02 02:24
[PATCH 4.19 000/116] 4.19.193-rc1 review 122 (122) 2021/06/02 02:23
[PATCH 4.14 00/79] 4.14.235-rc1 review 83 (83) 2021/06/02 01:46
[PATCH 4.9 00/66] 4.9.271-rc1 review 69 (69) 2021/06/01 02:13
[PATCH 4.4 00/54] 4.4.271-rc1 review 59 (59) 2021/05/31 21:43
KASAN: stack-out-of-bounds Write in i801_isr 0 (1) 2020/08/26 15:05
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: stack-out-of-bounds Write in i801_isr (3) i2c 1 256d 252d 0/28 auto-obsoleted due to no activity on 2024/06/18 11:09
upstream KASAN: stack-out-of-bounds Write in i801_isr (2) i2c 1 595d 590d 0/28 auto-obsoleted due to no activity on 2023/08/04 06:44
upstream KASAN: out-of-bounds Read in i801_isr i2c 16 1249d 1289d 20/28 fixed on 2021/11/10 00:50

Sample crash report:
BUG: KASAN: stack-out-of-bounds in i801_isr_byte_done drivers/i2c/busses/i2c-i801.c:593 [inline]
BUG: KASAN: stack-out-of-bounds in i801_isr drivers/i2c/busses/i2c-i801.c:664 [inline]
BUG: KASAN: stack-out-of-bounds in i801_isr+0xb2d/0xbf0 drivers/i2c/busses/i2c-i801.c:645
Write of size 1 at addr ffffc90001a77dcc by task syz-executor.3/11619

CPU: 3 PID: 11619 Comm: syz-executor.3 Not tainted 5.9.0-rc4-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x198/0x1fd lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0x5/0x497 mm/kasan/report.c:383
 __kasan_report mm/kasan/report.c:513 [inline]
 kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530
 i801_isr_byte_done drivers/i2c/busses/i2c-i801.c:593 [inline]
 i801_isr drivers/i2c/busses/i2c-i801.c:664 [inline]
 i801_isr+0xb2d/0xbf0 drivers/i2c/busses/i2c-i801.c:645
 __handle_irq_event_percpu+0x223/0xaa0 kernel/irq/handle.c:156
 handle_irq_event_percpu kernel/irq/handle.c:196 [inline]
 handle_irq_event+0x102/0x285 kernel/irq/handle.c:213
 handle_fasteoi_irq+0x22f/0x9f0 kernel/irq/chip.c:714
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:50 [inline]
 handle_irq arch/x86/kernel/irq.c:230 [inline]
 __common_interrupt arch/x86/kernel/irq.c:249 [inline]
 common_interrupt+0x96/0x1f0 arch/x86/kernel/irq.c:239
 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:572
RIP: 0010:__do_softirq+0x1ba/0xa91 kernel/softirq.c:284
Code: c7 c0 58 3c b6 89 48 c1 e8 03 42 80 3c 30 00 0f 85 ea 07 00 00 48 83 3d ab 3a 96 01 00 0f 84 b7 06 00 00 fb 66 0f 1f 44 00 00 <48> c7 44 24 08 c0 90 a0 89 b8 ff ff ff ff 0f bc 04 24 83 c0 01 89
RSP: 0018:ffffc90000598f70 EFLAGS: 00000282
RAX: 1ffffffff136c78b RBX: ffff888021f056c0 RCX: 1ffffffff15645f9
RDX: 0000000000000000 RSI: 0000000000000101 RDI: 0000000000000000
RBP: ffffc90001737ba0 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 0000000000000000
 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706
 </IRQ>
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
 do_softirq_own_stack+0x9d/0xd0 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:393 [inline]
 __irq_exit_rcu kernel/softirq.c:423 [inline]
 irq_exit_rcu+0x235/0x280 kernel/softirq.c:435
 sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:770 [inline]
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x4d/0x90 kernel/locking/spinlock.c:191
Code: 48 c7 c0 48 3c b6 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 3c 48 83 3d 62 07 bf 01 00 74 29 48 89 df 57 9d <0f> 1f 44 00 00 bf 01 00 00 00 e8 44 80 58 f9 65 8b 05 7d c9 0a 78
RSP: 0018:ffffc90001737ca8 EFLAGS: 00000282
RAX: 1ffffffff136c789 RBX: 0000000000000282 RCX: 1ffffffff15645f9
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000282
RBP: ffff88802d127740 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000001 R14: ffffc90001737e28 R15: ffff888021f056c0
 hrtimer_start_expires include/linux/hrtimer.h:436 [inline]
 hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1804 [inline]
 do_nanosleep+0x1bc/0x650 kernel/time/hrtimer.c:1880
 hrtimer_nanosleep+0x1f9/0x430 kernel/time/hrtimer.c:1936
 __do_sys_nanosleep kernel/time/hrtimer.c:1970 [inline]
 __se_sys_nanosleep kernel/time/hrtimer.c:1957 [inline]
 __x64_sys_nanosleep+0x1dc/0x260 kernel/time/hrtimer.c:1957
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45ba31
Code: 75 14 b8 23 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 c4 c9 fb ff c3 48 83 ec 08 e8 8a 2d 00 00 48 89 04 24 b8 23 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 d3 2d 00 00 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007ffe114d8000 EFLAGS: 00000293 ORIG_RAX: 0000000000000023
RAX: ffffffffffffffda RBX: 000000000012eada RCX: 000000000045ba31
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffe114d8010
RBP: 00007ffe114d807c R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000001388
R13: 0000000000000001 R14: 000000000012ea65 R15: 00000000ffffffff


Memory state around the buggy address:
 ffffc90001a77c80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc90001a77d00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc90001a77d80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                                              ^
 ffffc90001a77e00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc90001a77e80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/12 11:58 upstream 729e3d091984 21d289c2 .config console log report ci-qemu-upstream
2020/08/26 11:30 upstream fffe3ae0ee84 318430cb .config console log report ci-qemu-upstream
2020/11/18 06:44 upstream 0fa8ee0d9ab9 09323409 .config console log report info ci-qemu-upstream-386
* Struck through repros no longer work on HEAD.