[syzbot] general protection fault in i2c_setup_smbus_alert

7 views
Skip to first unread message

syzbot

unread,
Feb 4, 2022, 6:42:22ā€ÆAM2/4/22
to andriy.s...@linux.intel.com, djrs...@gmail.com, gre...@linuxfoundation.org, heikki....@linux.intel.com, linux...@vger.kernel.org, linux-...@vger.kernel.org, raf...@kernel.org, sakari...@linux.intel.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 887a333c44eb Add linux-next specific files for 20220131
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=141d71e0700000
kernel config: https://syzkaller.appspot.com/x/.config?x=a9a7db1ff785d5c0
dashboard link: https://syzkaller.appspot.com/bug?extid=0591ccf54ee05344e4eb
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

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+0591cc...@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc000000008a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000450-0x0000000000000457]
CPU: 0 PID: 3685 Comm: kworker/0:6 Not tainted 5.17.0-rc2-next-20220131-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
RIP: 0010:dev_fwnode drivers/base/property.c:22 [inline]
RIP: 0010:device_property_match_string+0x2c/0xa0 drivers/base/property.c:224
Code: 49 89 d5 41 54 49 89 f4 55 53 48 89 fb e8 2c 0e f7 fc 48 8d bb 50 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 5a 48 8b ab 50 04 00 00 48 85 ed 74 22 e8 fd 0d f7
RSP: 0018:ffffc90004096fd8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc900134aa000
RDX: 000000000000008a RSI: ffffffff84819374 RDI: 0000000000000450
RBP: ffff88801a685038 R08: 0000000000000000 R09: ffff88801a6851a3
R10: ffffffff85ed1a99 R11: 0000000000000000 R12: ffffffff8a660120
R13: ffffffff8a6600e0 R14: ffff88801a685660 R15: ffff88801a685664
FS: 0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1ac663a9ee CR3: 000000007a1ff000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
i2c_setup_smbus_alert+0x9c/0x1a0 drivers/i2c/i2c-core-smbus.c:710
i2c_register_adapter+0x32f/0x1150 drivers/i2c/i2c-core-base.c:1482
i2c_add_adapter+0x11a/0x1c0 drivers/i2c/i2c-core-base.c:1587
osif_probe+0x2ae/0x500 drivers/i2c/busses/i2c-robotfuzz-osif.c:164
usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:517 [inline]
really_probe+0x245/0xcc0 drivers/base/dd.c:596
__driver_probe_device+0x338/0x4d0 drivers/base/dd.c:752
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:782
__device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:899
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x228/0x4a0 drivers/base/dd.c:970
bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
device_add+0xc17/0x1ee0 drivers/base/core.c:3405
usb_set_configuration+0x101e/0x1900 drivers/usb/core/message.c:2170
usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238
usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:517 [inline]
really_probe+0x245/0xcc0 drivers/base/dd.c:596
__driver_probe_device+0x338/0x4d0 drivers/base/dd.c:752
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:782
__device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:899
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x228/0x4a0 drivers/base/dd.c:970
bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
device_add+0xc17/0x1ee0 drivers/base/core.c:3405
usb_new_device.cold+0x63f/0x108e drivers/usb/core/hub.c:2566
hub_port_connect drivers/usb/core/hub.c:5362 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5506 [inline]
port_event drivers/usb/core/hub.c:5664 [inline]
hub_event+0x25c6/0x4680 drivers/usb/core/hub.c:5746
process_one_work+0x996/0x1610 kernel/workqueue.c:2289
worker_thread+0x665/0x1080 kernel/workqueue.c:2436
kthread+0x2e9/0x3a0 kernel/kthread.c:377
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:dev_fwnode drivers/base/property.c:22 [inline]
RIP: 0010:device_property_match_string+0x2c/0xa0 drivers/base/property.c:224
Code: 49 89 d5 41 54 49 89 f4 55 53 48 89 fb e8 2c 0e f7 fc 48 8d bb 50 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 5a 48 8b ab 50 04 00 00 48 85 ed 74 22 e8 fd 0d f7
RSP: 0018:ffffc90004096fd8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc900134aa000
RDX: 000000000000008a RSI: ffffffff84819374 RDI: 0000000000000450
RBP: ffff88801a685038 R08: 0000000000000000 R09: ffff88801a6851a3
R10: ffffffff85ed1a99 R11: 0000000000000000 R12: ffffffff8a660120
R13: ffffffff8a6600e0 R14: ffff88801a685660 R15: ffff88801a685664
FS: 0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fda5e249090 CR3: 00000000348b9000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 49 89 d5 mov %rdx,%r13
3: 41 54 push %r12
5: 49 89 f4 mov %rsi,%r12
8: 55 push %rbp
9: 53 push %rbx
a: 48 89 fb mov %rdi,%rbx
d: e8 2c 0e f7 fc callq 0xfcf70e3e
12: 48 8d bb 50 04 00 00 lea 0x450(%rbx),%rdi
19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
20: fc ff df
23: 48 89 fa mov %rdi,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 75 5a jne 0x8a
30: 48 8b ab 50 04 00 00 mov 0x450(%rbx),%rbp
37: 48 85 ed test %rbp,%rbp
3a: 74 22 je 0x5e
3c: e8 .byte 0xe8
3d: fd std
3e: 0d .byte 0xd
3f: f7 .byte 0xf7


---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Feb 10, 2022, 7:37:20ā€ÆPM2/10/22
to andriy.s...@linux.intel.com, djrs...@gmail.com, gre...@linuxfoundation.org, heikki....@linux.intel.com, jo...@kernel.org, linux...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, raf...@kernel.org, sakari...@linux.intel.com, syzkall...@googlegroups.com, w...@kernel.org
syzbot has found a reproducer for the following issue on:

HEAD commit: ef6b35306dd8 Add linux-next specific files for 20220204
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=15e40d84700000
kernel config: https://syzkaller.appspot.com/x/.config?x=e0431e0b00810b4f
dashboard link: https://syzkaller.appspot.com/bug?extid=0591ccf54ee05344e4eb
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1105f472700000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16492aa4700000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0591cc...@syzkaller.appspotmail.com

usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: syz
usb 1-1: Manufacturer: syz
usb 1-1: SerialNumber: syz
usb 1-1: config 0 descriptor??
general protection fault, probably for non-canonical address 0xdffffc000000008a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000450-0x0000000000000457]
CPU: 1 PID: 35 Comm: kworker/1:1 Not tainted 5.17.0-rc2-next-20220204-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
RIP: 0010:dev_fwnode drivers/base/property.c:22 [inline]
RIP: 0010:device_property_match_string+0x2c/0xa0 drivers/base/property.c:224
Code: 49 89 d5 41 54 49 89 f4 55 53 48 89 fb e8 bc 01 fa fc 48 8d bb 50 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 5a 48 8b ab 50 04 00 00 48 85 ed 74 22 e8 8d 01 fa
RSP: 0018:ffffc900010befd8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 000000000000008a RSI: ffffffff847ea734 RDI: 0000000000000450
RBP: ffff8880127ec038 R08: 0000000000000000 R09: ffff8880127ec1a3
R10: ffffffff85ea3a99 R11: 0000000000000000 R12: ffffffff8a658720
R13: ffffffff8a6586e0 R14: ffff8880127ec660 R15: ffff8880127ec664
FS: 0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd0b1f0910 CR3: 000000007f0f9000 CR4: 00000000003506e0
----------------
Code disassembly (best guess):
0: 49 89 d5 mov %rdx,%r13
3: 41 54 push %r12
5: 49 89 f4 mov %rsi,%r12
8: 55 push %rbp
9: 53 push %rbx
a: 48 89 fb mov %rdi,%rbx
d: e8 bc 01 fa fc callq 0xfcfa01ce
12: 48 8d bb 50 04 00 00 lea 0x450(%rbx),%rdi
19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
20: fc ff df
23: 48 89 fa mov %rdi,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 75 5a jne 0x8a
30: 48 8b ab 50 04 00 00 mov 0x450(%rbx),%rbp
37: 48 85 ed test %rbp,%rbp
3a: 74 22 je 0x5e
3c: e8 .byte 0xe8
3d: 8d 01 lea (%rcx),%eax
3f: fa cli

syzbot

unread,
Feb 10, 2022, 10:51:09ā€ÆPM2/10/22
to akhil...@nvidia.com, andriy.s...@linux.intel.com, andy.sh...@gmail.com, djrs...@gmail.com, gre...@linuxfoundation.org, heikki....@linux.intel.com, jo...@kernel.org, linux...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, raf...@kernel.org, sakari...@linux.intel.com, syzkall...@googlegroups.com, w...@kernel.org
syzbot has bisected this issue to:

commit a263a84088f689bf0c1552a510b25d0bcc45fcae
Author: Akhil R <akhil...@nvidia.com>
Date: Fri Jan 28 11:44:27 2022 +0000

i2c: smbus: Use device_*() functions instead of of_*()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=156c8174700000
start commit: ef6b35306dd8 Add linux-next specific files for 20220204
git tree: linux-next
final oops: https://syzkaller.appspot.com/x/report.txt?x=176c8174700000
console output: https://syzkaller.appspot.com/x/log.txt?x=136c8174700000
Reported-by: syzbot+0591cc...@syzkaller.appspotmail.com
Fixes: a263a84088f6 ("i2c: smbus: Use device_*() functions instead of of_*()")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Andy Shevchenko

unread,
Feb 11, 2022, 3:40:05ā€ÆAM2/11/22
to syzbot, akhil...@nvidia.com, djrs...@gmail.com, gre...@linuxfoundation.org, heikki....@linux.intel.com, jo...@kernel.org, linux...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, raf...@kernel.org, sakari...@linux.intel.com, syzkall...@googlegroups.com, w...@kernel.org
I was faster :-)

https://lore.kernel.org/all/20220204155920.13364...@linux.intel.com/

--
With Best Regards,
Andy Shevchenko


Akhil R

unread,
Feb 11, 2022, 3:49:49ā€ÆAM2/11/22
to Andy Shevchenko, syzbot, djrs...@gmail.com, gre...@linuxfoundation.org, heikki....@linux.intel.com, jo...@kernel.org, linux...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, raf...@kernel.org, sakari...@linux.intel.com, syzkall...@googlegroups.com, w...@kernel.org
> https://lore.kernel.org/all/20220204155920.13364-1-
> andriy.s...@linux.intel.com/
>
Thanks. I was looking for the details on the issue and found that you had
submitted the fixes. :-)
https://lore.kernel.org/lkml/20220204151726.8924...@linux.intel.com/T/

Thanks,
Akhil
Reply all
Reply to author
Forward
0 new messages