Skip to content

Bluetooth: hci_qca: fix NULL pointer dereferences for non-serdev devices

Zijun Hu linux-arm-msm linux-bluetooth lkml 1 version Applied

Status from this message: This series was applied to bluetooth/bluetooth-next.git (master)

Get series with b4
b4 am [email protected] change-id 20260601-fix_none_serdev-5f0635c21681

Versions newest first

  1. v1 Latest2 patches 1 replyApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2Bluetooth: hci_qca: fix NULL pointer dereference in qca_setup() for non-serdev devicedrivers/bluetooth/hci_qca.c+6 -31 replyApplied
2/2Bluetooth: hci_qca: fix NULL pointer dereference in qca_dmp_hdr() for non-serdev devicedrivers/bluetooth/hci_qca.c+1 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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.

---
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,

Signature · 1 line
Zijun Hu <[email protected]>