syzbot


general protection fault in mcp_i2c_xfer

Status: upstream: reported syz repro on 2025/03/28 02:43
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+03d875266c03a05c9ccb@syzkaller.appspotmail.com
First crash: 29d, last: 10d
Bug presence (1)
Date Name Commit Repro Result
2025/04/06 upstream (ToT) f4d2ef48250a C [report] unregister_netdevice: waiting for DEV to become free
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 general protection fault in mcp_i2c_xfer origin:upstream C 7 1h02m 28d 0/3 upstream: reported C repro on 2025/03/28 20:36

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 5142 Comm: syz.2.668 Not tainted 6.1.132-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:mcp_i2c_xfer+0x5a/0x430 drivers/hid/hid-mcp2221.c:309
Code: 00 48 89 d8 48 c1 e8 03 80 3c 28 00 74 08 48 89 df e8 1a 9f c3 f9 4c 8b 33 4d 89 f4 49 c1 ec 03 48 b8 00 00 00 00 00 fc ff df <41> 80 3c 04 00 74 08 4c 89 f7 e8 f7 9e c3 f9 49 8b 1e 48 8d ab a8
RSP: 0018:ffffc90005d07898 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff8880798621d8 RCX: ffff88802df1bb80
RDX: 0000000000000000 RSI: ffffc90005d07b00 RDI: ffff888079862030
RBP: dffffc0000000000 R08: ffffffff870aab7f R09: ffffed100f30c4ba
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000000 R15: ffffc90005d07b00
FS:  000055556b5fc500(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000000012c0 CR3: 0000000027455000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __i2c_transfer+0x850/0x2380 drivers/i2c/i2c-core-base.c:-1
 i2c_transfer+0x261/0x3a0 drivers/i2c/i2c-core-base.c:2333
 i2c_transfer_buffer_flags+0x17c/0x260 drivers/i2c/i2c-core-base.c:2361
 i2c_master_send include/linux/i2c.h:110 [inline]
 i2cdev_write+0x88/0x130 drivers/i2c/i2c-dev.c:175
 do_loop_readv_writev fs/read_write.c:-1 [inline]
 do_iter_write+0x503/0xc40 fs/read_write.c:863
 vfs_writev fs/read_write.c:934 [inline]
 do_writev+0x27b/0x460 fs/read_write.c:977
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fa59518d169
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe40407c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007fa5953a5fa0 RCX: 00007fa59518d169
RDX: 0000000000000001 RSI: 00002000000012c0 RDI: 0000000000000005
RBP: 00007fa59520e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa5953a5fa0 R14: 00007fa5953a5fa0 R15: 0000000000000003
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mcp_i2c_xfer+0x5a/0x430 drivers/hid/hid-mcp2221.c:309
Code: 00 48 89 d8 48 c1 e8 03 80 3c 28 00 74 08 48 89 df e8 1a 9f c3 f9 4c 8b 33 4d 89 f4 49 c1 ec 03 48 b8 00 00 00 00 00 fc ff df <41> 80 3c 04 00 74 08 4c 89 f7 e8 f7 9e c3 f9 49 8b 1e 48 8d ab a8
RSP: 0018:ffffc90005d07898 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff8880798621d8 RCX: ffff88802df1bb80
RDX: 0000000000000000 RSI: ffffc90005d07b00 RDI: ffff888079862030
RBP: dffffc0000000000 R08: ffffffff870aab7f R09: ffffed100f30c4ba
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000000 R15: ffffc90005d07b00
FS:  000055556b5fc500(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb3c3e4aea0 CR3: 0000000027455000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 48 89             	add    %cl,-0x77(%rax)
   3:	d8 48 c1             	fmuls  -0x3f(%rax)
   6:	e8 03 80 3c 28       	call   0x283c800e
   b:	00 74 08 48          	add    %dh,0x48(%rax,%rcx,1)
   f:	89 df                	mov    %ebx,%edi
  11:	e8 1a 9f c3 f9       	call   0xf9c39f30
  16:	4c 8b 33             	mov    (%rbx),%r14
  19:	4d 89 f4             	mov    %r14,%r12
  1c:	49 c1 ec 03          	shr    $0x3,%r12
  20:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  27:	fc ff df
* 2a:	41 80 3c 04 00       	cmpb   $0x0,(%r12,%rax,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 f7             	mov    %r14,%rdi
  34:	e8 f7 9e c3 f9       	call   0xf9c39f30
  39:	49 8b 1e             	mov    (%r14),%rbx
  3c:	48                   	rex.W
  3d:	8d                   	.byte 0x8d
  3e:	ab                   	stos   %eax,%es:(%rdi)
  3f:	a8                   	.byte 0xa8

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/30 14:41 linux-6.1.y 8e60a714ba3b d3999433 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
2025/04/15 13:33 linux-6.1.y 420102835862 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
2025/04/11 10:52 linux-6.1.y 420102835862 94486846 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
2025/04/11 10:51 linux-6.1.y 420102835862 94486846 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
2025/04/11 10:50 linux-6.1.y 420102835862 94486846 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
2025/04/10 22:29 linux-6.1.y 420102835862 1ef3ab4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
2025/03/30 05:51 linux-6.1.y 8e60a714ba3b d3999433 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
2025/03/28 02:43 linux-6.1.y 344a09659766 6c09fb82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in mcp_i2c_xfer
* Struck through repros no longer work on HEAD.