Re: [PATCH] Bluetooth: hci_uart: add missing NULL check in h5_enqueue

From: Marcel Holtmann
Date: Mon Mar 14 2022 - 11:34:37 EST


Hi Pavel,

> 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@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: d9dd833cf6d2 ("Bluetooth: hci_h5: Add runtime suspend")
> Signed-off-by: Pavel Skripkin <paskripkin@xxxxxxxxx>
> ---
> drivers/bluetooth/hci_h5.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

However if someone would finally step up and write a standalone serdev only driver for 3-Wire UART support, this would not be a problem in the first place. We are just applying on bandaid after another.

Regards

Marcel