[syzbot] general protection fault in qca_power_shutdown

From: syzbot
Date: Fri Apr 23 2021 - 02:39:32 EST


Hello,

syzbot found the following issue on:

HEAD commit: c98ff1d0 Merge tag 'scsi-fixes' of git://git.kernel.org/pu..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16d44341d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=339c2ecce8fdd1d0
dashboard link: https://syzkaller.appspot.com/bug?extid=adafc67b05ed63665d5e

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+adafc67b05ed63665d5e@xxxxxxxxxxxxxxxxxxxxxxxxx

Bluetooth: hci7: Reading QCA version information failed (-110)
Bluetooth: hci7: Retry BT power ON:0
general protection fault, probably for non-canonical address 0xdffffc000000000f: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000078-0x000000000000007f]
CPU: 1 PID: 6293 Comm: kworker/u5:5 Not tainted 5.12.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: hci7 hci_power_on
RIP: 0010:dev_get_drvdata include/linux/device.h:666 [inline]
RIP: 0010:serdev_device_get_drvdata include/linux/serdev.h:117 [inline]
RIP: 0010:qca_soc_type drivers/bluetooth/hci_qca.c:240 [inline]
RIP: 0010:qca_power_shutdown+0x77/0x3b0 drivers/bluetooth/hci_qca.c:1821
Code: 4c 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 e8 02 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 75 08 49 8d 7e 78 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ae 02 00 00 4d 85 f6 4d 8b 6e 78 41 bc 01 00 00
RSP: 0018:ffffc9000193f978 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff888024c82000 RCX: 0000000000000000
RDX: 000000000000000f RSI: ffffffff864835a6 RDI: 0000000000000078
RBP: ffff88802818b800 R08: 0000000000000024 R09: 0000000000000000
R10: ffffffff815bdabe R11: 0000000000000000 R12: dffffc0000000000
R13: ffff88802818b800 R14: 0000000000000000 R15: ffff88802818b808
FS: 0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004e4a61 CR3: 000000007172f000 CR4: 00000000001526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
qca_setup+0x912/0x2070 drivers/bluetooth/hci_qca.c:1740
hci_uart_setup+0x1b1/0x480 drivers/bluetooth/hci_ldisc.c:423
hci_dev_do_open+0x3e1/0x1a00 net/bluetooth/hci_core.c:1499
hci_power_on+0x133/0x650 net/bluetooth/hci_core.c:2247
process_one_work+0x98d/0x1600 kernel/workqueue.c:2275
worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
kthread+0x3b1/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Modules linked in:
---[ end trace d4921a9b71de1581 ]---
RIP: 0010:dev_get_drvdata include/linux/device.h:666 [inline]
RIP: 0010:serdev_device_get_drvdata include/linux/serdev.h:117 [inline]
RIP: 0010:qca_soc_type drivers/bluetooth/hci_qca.c:240 [inline]
RIP: 0010:qca_power_shutdown+0x77/0x3b0 drivers/bluetooth/hci_qca.c:1821
Code: 4c 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 e8 02 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 75 08 49 8d 7e 78 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ae 02 00 00 4d 85 f6 4d 8b 6e 78 41 bc 01 00 00
RSP: 0018:ffffc9000193f978 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff888024c82000 RCX: 0000000000000000
RDX: 000000000000000f RSI: ffffffff864835a6 RDI: 0000000000000078
RBP: ffff88802818b800 R08: 0000000000000024 R09: 0000000000000000
R10: ffffffff815bdabe R11: 0000000000000000 R12: dffffc0000000000
R13: ffff88802818b800 R14: 0000000000000000 R15: ffff88802818b808
FS: 0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004e4a61 CR3: 000000007172f000 CR4: 00000000001526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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@xxxxxxxxxxxxxxxx.

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