]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
Bluetooth: hci_uart: add missing NULL check in h5_enqueue
authorPavel Skripkin <paskripkin@gmail.com>
Sun, 13 Mar 2022 17:49:36 +0000 (20:49 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:39:14 +0000 (14:39 +0200)
commit3f453cbdf0664b995769a53bfd0986dfa583925b
treebf25d76acce34f6e554e69a34fd2201d0a4d49b4
parent8c519668bb8d86e484cf5b8ec60e03048cefc8e8
Bluetooth: hci_uart: add missing NULL check in h5_enqueue

BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit 32cb08e958696908a9aad5e49a78d74f7e32fffb ]

Syzbot hit general protection fault in __pm_runtime_resume(). The problem
was in missing NULL check.

hu->serdev can be NULL and we should not blindly pass &serdev->dev
somewhere, since it will cause GPF.

Reported-by: syzbot+b9bd12fbed3485a3e51f@syzkaller.appspotmail.com
Fixes: d9dd833cf6d2 ("Bluetooth: hci_h5: Add runtime suspend")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7235485433d290367d60ae22fcdfc565e61d42ab)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/bluetooth/hci_h5.c