Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1624137 > unrolled thread

[PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure

Started bySebastian Reichel <sre@kernel.org>
First post2017-04-16 00:00 +0200
Last post2017-04-16 20:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure Sebastian Reichel <sre@kernel.org> - 2017-04-16 00:00 +0200
    Re: [PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload  failure Marcel Holtmann <marcel@holtmann.org> - 2017-04-16 20:40 +0200

#1624137 — [PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure

FromSebastian Reichel <sre@kernel.org>
Date2017-04-16 00:00 +0200
Subject[PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure
Message-ID<twDTz-3AT-7@gated-at.bofh.it>
Avoid NULL pointer dereference occurring due to freeing
skb containing an error pointer. It can easily be triggered
by using the driver with broken uart (i.e. due to misconfigured
pinmuxing).

Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/bluetooth/hci_ll.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 485e8eb04542..adc444f309a3 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -537,8 +537,7 @@ static int read_local_version(struct hci_dev *hdev)
 	if (IS_ERR(skb)) {
 		bt_dev_err(hdev, "Reading TI version information failed (%ld)",
 			   PTR_ERR(skb));
-		err = PTR_ERR(skb);
-		goto out;
+		return PTR_ERR(skb);
 	}
 	if (skb->len != sizeof(*ver)) {
 		err = -EILSEQ;
-- 
2.11.0

[toc] | [next] | [standalone]


#1624418 — Re: [PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure

FromMarcel Holtmann <marcel@holtmann.org>
Date2017-04-16 20:40 +0200
SubjectRe: [PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure
Message-ID<twXfz-71V-1@gated-at.bofh.it>
In reply to#1624137
Hi Sebastian,

> Avoid NULL pointer dereference occurring due to freeing
> skb containing an error pointer. It can easily be triggered
> by using the driver with broken uart (i.e. due to misconfigured
> pinmuxing).
> 
> Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
> drivers/bluetooth/hci_ll.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web