* [syzbot] WARNING in __i2c_transfer (2)
@ 2021-11-15 12:19 syzbot
2021-12-07 22:06 ` syzbot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: syzbot @ 2021-11-15 12:19 UTC (permalink / raw)
To: linux-i2c, linux-kernel, syzkaller-bugs, wsa
Hello,
syzbot found the following issue on:
HEAD commit: c8c109546a19 Merge tag 'zstd-for-linus-v5.16' of git://git..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10a5bb32b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a262045c4c15a9e0
dashboard link: https://syzkaller.appspot.com/bug?extid=e417648b303855b91d8a
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: i386
Unfortunately, I don't have any reproducer for this issue yet.
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e417648b303855b91d8a@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 0 PID: 12113 at drivers/i2c/i2c-core-base.c:2178 __i2c_transfer+0xa14/0x17c0 drivers/i2c/i2c-core-base.c:2178
Modules linked in:
CPU: 0 PID: 12113 Comm: syz-executor.4 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__i2c_transfer+0xa14/0x17c0 drivers/i2c/i2c-core-base.c:2178
Code: 0f 94 c7 31 ff 44 89 fe e8 39 89 8e fb 45 84 ff 0f 84 26 fd ff ff e8 4b 85 8e fb 0f 1f 44 00 00 e9 17 fd ff ff e8 3c 85 8e fb <0f> 0b 41 bc ea ff ff ff e9 9e fd ff ff e8 2a 85 8e fb 44 89 ee bf
RSP: 0018:ffffc90004a67ce8 EFLAGS: 00010212
RAX: 0000000000008838 RBX: 0000000000000010 RCX: ffffc90011e05000
RDX: 0000000000040000 RSI: ffffffff85e961b4 RDI: 0000000000000003
RBP: ffff88814a28cb58 R08: 0000000000000000 R09: ffffffff8ff75b57
R10: ffffffff85e957d8 R11: 0000000000000000 R12: 0000000000000010
R13: 0000000000000000 R14: ffff88814a28cb78 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880b9c00000(0063) knlGS:00000000f4460b40
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 000000002c021000 CR3: 0000000070b50000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
i2c_transfer+0x1e6/0x3e0 drivers/i2c/i2c-core-base.c:2269
i2cdev_ioctl_rdwr+0x583/0x6a0 drivers/i2c/i2c-dev.c:297
compat_i2cdev_ioctl+0x419/0x4f0 drivers/i2c/i2c-dev.c:561
__do_compat_sys_ioctl+0x1c7/0x290 fs/ioctl.c:972
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf6e66549
Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f44605fc EFLAGS: 00000296 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000707
RDX: 00000000200000c0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
----------------
Code disassembly (best guess):
0: 03 74 c0 01 add 0x1(%rax,%rax,8),%esi
4: 10 05 03 74 b8 01 adc %al,0x1b87403(%rip) # 0x1b8740d
a: 10 06 adc %al,(%rsi)
c: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi
10: 10 07 adc %al,(%rdi)
12: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi
16: 10 08 adc %cl,(%rax)
18: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi
1c: 00 00 add %al,(%rax)
1e: 00 00 add %al,(%rax)
20: 00 51 52 add %dl,0x52(%rcx)
23: 55 push %rbp
24: 89 e5 mov %esp,%ebp
26: 0f 34 sysenter
28: cd 80 int $0x80
* 2a: 5d pop %rbp <-- trapping instruction
2b: 5a pop %rdx
2c: 59 pop %rcx
2d: c3 retq
2e: 90 nop
2f: 90 nop
30: 90 nop
31: 90 nop
32: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
39: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] WARNING in __i2c_transfer (2)
2021-11-15 12:19 [syzbot] WARNING in __i2c_transfer (2) syzbot
@ 2021-12-07 22:06 ` syzbot
2021-12-08 16:50 ` syzbot
2021-12-25 12:39 ` Pavel Skripkin
2 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2021-12-07 22:06 UTC (permalink / raw)
To: linux-i2c, linux-kernel, syzkaller-bugs, wsa
syzbot has found a reproducer for the following issue on:
HEAD commit: cd8c917a56f2 Makefile: Do not quote value for CONFIG_CC_IM..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=139ff2e5b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=221ffc09e39ebbd1
dashboard link: https://syzkaller.appspot.com/bug?extid=e417648b303855b91d8a
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: i386
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17a68531b00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16b91d89b00000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e417648b303855b91d8a@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 1 PID: 6516 at drivers/i2c/i2c-core-base.c:2178 __i2c_transfer+0xa14/0x17c0 drivers/i2c/i2c-core-base.c:2178
Modules linked in:
CPU: 1 PID: 6516 Comm: syz-executor214 Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__i2c_transfer+0xa14/0x17c0 drivers/i2c/i2c-core-base.c:2178
Code: 0f 94 c7 31 ff 44 89 fe e8 39 d9 9b fb 45 84 ff 0f 84 26 fd ff ff e8 4b d5 9b fb e8 95 6f 24 fb e9 17 fd ff ff e8 3c d5 9b fb <0f> 0b 41 bc ea ff ff ff e9 9e fd ff ff e8 2a d5 9b fb 44 89 ee bf
RSP: 0018:ffffc900029dfce8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000010 RCX: 0000000000000000
RDX: ffff88807929ba00 RSI: ffffffff85dbd5b4 RDI: 0000000000000003
RBP: ffff888021b94b58 R08: 0000000000000000 R09: ffffffff8ff73acf
R10: ffffffff85dbcbd8 R11: 0000000000000000 R12: 0000000000000010
R13: 0000000000000000 R14: ffff888021b94b78 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880b9d00000(0063) knlGS:00000000576f92c0
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00007fa70f9116c0 CR3: 000000007f540000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
i2c_transfer+0x1e6/0x3e0 drivers/i2c/i2c-core-base.c:2269
i2cdev_ioctl_rdwr+0x583/0x6a0 drivers/i2c/i2c-dev.c:297
compat_i2cdev_ioctl+0x419/0x4f0 drivers/i2c/i2c-dev.c:561
__do_compat_sys_ioctl+0x1c7/0x290 fs/ioctl.c:972
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf7f41549
Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000ffd6affc EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000707
RDX: 0000000020000700 RSI: 00000000ffd6b050 RDI: 00000000f7fe8000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
----------------
Code disassembly (best guess):
0: 03 74 c0 01 add 0x1(%rax,%rax,8),%esi
4: 10 05 03 74 b8 01 adc %al,0x1b87403(%rip) # 0x1b8740d
a: 10 06 adc %al,(%rsi)
c: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi
10: 10 07 adc %al,(%rdi)
12: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi
16: 10 08 adc %cl,(%rax)
18: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi
1c: 00 00 add %al,(%rax)
1e: 00 00 add %al,(%rax)
20: 00 51 52 add %dl,0x52(%rcx)
23: 55 push %rbp
24: 89 e5 mov %esp,%ebp
26: 0f 34 sysenter
28: cd 80 int $0x80
* 2a: 5d pop %rbp <-- trapping instruction
2b: 5a pop %rdx
2c: 59 pop %rcx
2d: c3 retq
2e: 90 nop
2f: 90 nop
30: 90 nop
31: 90 nop
32: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
39: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] WARNING in __i2c_transfer (2)
2021-11-15 12:19 [syzbot] WARNING in __i2c_transfer (2) syzbot
2021-12-07 22:06 ` syzbot
@ 2021-12-08 16:50 ` syzbot
2021-12-25 12:39 ` Pavel Skripkin
2 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2021-12-08 16:50 UTC (permalink / raw)
To: dwlsalmeida, linux-i2c, linux-kernel, linux-media,
mchehab+huawei, mchehab, syzkaller-bugs, wsa
syzbot has bisected this issue to:
commit f90cf6079bf67988f8b1ad1ade70fc89d0080905
Author: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Date: Fri Aug 21 12:58:47 2020 +0000
media: vidtv: add a bridge driver
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=152b58b1b00000
start commit: cd8c917a56f2 Makefile: Do not quote value for CONFIG_CC_IM..
git tree: upstream
final oops: https://syzkaller.appspot.com/x/report.txt?x=172b58b1b00000
console output: https://syzkaller.appspot.com/x/log.txt?x=132b58b1b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=221ffc09e39ebbd1
dashboard link: https://syzkaller.appspot.com/bug?extid=e417648b303855b91d8a
userspace arch: i386
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17a68531b00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16b91d89b00000
Reported-by: syzbot+e417648b303855b91d8a@syzkaller.appspotmail.com
Fixes: f90cf6079bf6 ("media: vidtv: add a bridge driver")
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] WARNING in __i2c_transfer (2)
2021-11-15 12:19 [syzbot] WARNING in __i2c_transfer (2) syzbot
2021-12-07 22:06 ` syzbot
2021-12-08 16:50 ` syzbot
@ 2021-12-25 12:39 ` Pavel Skripkin
2021-12-25 12:50 ` syzbot
2 siblings, 1 reply; 5+ messages in thread
From: Pavel Skripkin @ 2021-12-25 12:39 UTC (permalink / raw)
To: syzbot, linux-i2c, linux-kernel, syzkaller-bugs, wsa
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
On 11/15/21 15:19, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: c8c109546a19 Merge tag 'zstd-for-linus-v5.16' of git://git..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=10a5bb32b00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=a262045c4c15a9e0
> dashboard link: https://syzkaller.appspot.com/bug?extid=e417648b303855b91d8a
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> userspace arch: i386
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+e417648b303855b91d8a@syzkaller.appspotmail.com
>
#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
With regards,
Pavel Skripkin
[-- Attachment #2: ph --]
[-- Type: text/plain, Size: 511 bytes --]
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index bce0e8bb7852..3b54efa4b1ec 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -535,7 +535,7 @@ static long compat_i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned lo
sizeof(rdwr_arg)))
return -EFAULT;
- if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS)
+ if (!rdwr_arg.nmsgs || rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS)
return -EINVAL;
rdwr_pa = kmalloc_array(rdwr_arg.nmsgs, sizeof(struct i2c_msg),
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [syzbot] WARNING in __i2c_transfer (2)
2021-12-25 12:39 ` Pavel Skripkin
@ 2021-12-25 12:50 ` syzbot
0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2021-12-25 12:50 UTC (permalink / raw)
To: linux-i2c, linux-kernel, paskripkin, syzkaller-bugs, wsa
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-and-tested-by: syzbot+e417648b303855b91d8a@syzkaller.appspotmail.com
Tested on:
commit: b927dfc6 Merge tag 'for-linus' of git://git.armlinux.o..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=c2cc5ccf0f9979ca
dashboard link: https://syzkaller.appspot.com/bug?extid=e417648b303855b91d8a
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: i386
patch: https://syzkaller.appspot.com/x/patch.diff?x=128718fdb00000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-25 12:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 12:19 [syzbot] WARNING in __i2c_transfer (2) syzbot
2021-12-07 22:06 ` syzbot
2021-12-08 16:50 ` syzbot
2021-12-25 12:39 ` Pavel Skripkin
2021-12-25 12:50 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).