syzbot


KASAN: out-of-bounds Write in i801_isr

Status: auto-closed as invalid on 2020/12/31 09:40
Subsystems: i2c
[Documentation on labels]
Reported-by: syzbot+be15dc0b1933f04b043a@syzkaller.appspotmail.com
First crash: 1543d, last: 1543d
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: out-of-bounds Write in i801_isr 0 (1) 2020/09/08 07:32
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: out-of-bounds Read in i801_isr i2c 16 1251d 1291d 20/28 fixed on 2021/11/10 00:50

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

CPU: 1 PID: 9302 Comm: udevd Not tainted 5.9.0-rc3-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:ffffc900004e8f70 EFLAGS: 00000282
RAX: 1ffffffff136c78b RBX: ffff88805ed1d6c0 RCX: 0000000000000002
RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000
RBP: ffffc900028e7b50 R08: 0000000000000001 R09: ffffffff8c5f1a87
R10: fffffbfff18be350 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:generic_write_check_limits+0x0/0x2a0 mm/filemap.c:3001
Code: 48 2b 04 25 28 00 00 00 75 0e 48 81 c4 a0 00 00 00 5b 5d 41 5c 41 5d c3 e8 7d 34 5f 06 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 <41> 56 49 89 fe 41 55 49 89 f5 41 54 55 48 89 d5 53 e8 fa d2 df ff
RSP: 0018:ffffc900028e7c58 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffffc900028e7db8 RCX: ffffffff81957817
RDX: ffffc900028e7ca0 RSI: 0000000000000000 RDI: ffff888027b1fa80
RBP: ffffc900028e7d68 R08: 0000000000000001 R09: ffff888018e7908f
R10: 0000000000000080 R11: 0000000000000000 R12: ffff888018e79080
R13: 1ffff9200051cf90 R14: 00000000ffffff80 R15: ffff888027b1fa80
 generic_write_checks mm/filemap.c:3053 [inline]
 generic_file_write_iter+0x2d3/0x5c0 mm/filemap.c:3562
 call_write_iter include/linux/fs.h:1882 [inline]
 new_sync_write+0x422/0x650 fs/read_write.c:503
 vfs_write+0x5ad/0x730 fs/read_write.c:578
 ksys_write+0x12d/0x250 fs/read_write.c:631
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f292cccc370
Code: 73 01 c3 48 8b 0d c8 4a 2b 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 83 3d 85 a2 2b 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 0e 8a 01 00 48 89 04 24
RSP: 002b:00007ffed324d908 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000001b RCX: 00007f292cccc370
RDX: 000000000000001b RSI: 00007f292d5cb000 RDI: 0000000000000005
RBP: 00007f292d5cb000 R08: 00007f292d5c47a0 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000cb8140
R13: 000000000000001b R14: 00007ffed324d9f0 R15: 0000000000000001


Memory state around the buggy address:
 ffffc900039c7c00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc900039c7c80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc900039c7d00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                                                                ^
 ffffc900039c7d80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc900039c7e00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/02 09:39 upstream b765a32a2e91 abf9ba4f .config console log report ci-qemu-upstream-386
* Struck through repros no longer work on HEAD.