Skip to content

Commit b79e040

Browse files
ea1davisVudentz
authored andcommitted
Bluetooth: btintel: Fix null ptr deref in btintel_read_version
If hci_cmd_sync_complete() is triggered and skb is NULL, then hdev->req_skb is NULL, which will cause this issue. Reported-and-tested-by: [email protected] Signed-off-by: Edward Adam Davis <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 9c16d0c commit b79e040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bluetooth/btintel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
435435
struct sk_buff *skb;
436436

437437
skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_CMD_TIMEOUT);
438-
if (IS_ERR(skb)) {
438+
if (IS_ERR_OR_NULL(skb)) {
439439
bt_dev_err(hdev, "Reading Intel version information failed (%ld)",
440440
PTR_ERR(skb));
441441
return PTR_ERR(skb);

0 commit comments

Comments
 (0)