[PATCH 0/2] Bluetooth: hci_qca: fix NULL pointer dereferences for non-serdev devices

Zijun Hu posted 2 patches 6 days, 18 hours ago
drivers/bluetooth/hci_qca.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
[PATCH 0/2] Bluetooth: hci_qca: fix NULL pointer dereferences for non-serdev devices
Posted by Zijun Hu 6 days, 18 hours ago
When a QCA controller is attached via a non-serdev path (e.g. hci_uart
line discipline), hu->serdev is NULL. A couple of code paths dereference
it unconditionally, leading to NULL pointer dereferences.

This series fixes two such cases:

 - qca_setup() dereferences the result of
   serdev_device_get_drvdata(hu->serdev).
 - qca_dmp_hdr() dereferences hu->serdev->dev.driver->name.

Both are fixed by guarding the dereference with a NULL check.

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
---
Zijun Hu (2):
      Bluetooth: hci_qca: fix NULL pointer dereference in qca_setup() for non-serdev device
      Bluetooth: hci_qca: fix NULL pointer dereference in qca_dmp_hdr() for non-serdev device

 drivers/bluetooth/hci_qca.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
base-commit: 379b101059b44f64f6c5c022724f880a68fed15b
change-id: 20260601-fix_none_serdev-5f0635c21681

Best regards,
-- 
Zijun Hu <zijun.hu@oss.qualcomm.com>