lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250630032335.473671-1-ipravdin.official@gmail.com>
Date: Sun, 29 Jun 2025 23:23:35 -0400
From: Ivan Pravdin <ipravdin.official@...il.com>
To: marcel@...tmann.org,
	luiz.dentz@...il.com,
	linux-bluetooth@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Ivan Pravdin <ipravdin.official@...il.com>,
	syzbot+4ed6852d4da4606c93da@...kaller.appspotmail.com
Subject: [PATCH] Bluetooth: set bcsp to NULL after purging

Set hu->priv to NULL after skb purging in bcsp_close to prevent NULL
pointer dereference in bcsp_recv.

Reported-by: syzbot+4ed6852d4da4606c93da@...kaller.appspotmail.com
Closes: https://lore.kernel.org/all/67b0cc5b.050a0220.6f0b7.0014.GAE@google.com/T/
Signed-off-by: Ivan Pravdin <ipravdin.official@...il.com>
---
 drivers/bluetooth/hci_bcsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
index 610d0e3c36d4..de9a6ed3a8aa 100644
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -739,8 +739,6 @@ static int bcsp_close(struct hci_uart *hu)
 
 	timer_shutdown_sync(&bcsp->tbcsp);
 
-	hu->priv = NULL;
-
 	BT_DBG("hu %p", hu);
 
 	skb_queue_purge(&bcsp->unack);
@@ -753,6 +751,8 @@ static int bcsp_close(struct hci_uart *hu)
 	}
 
 	kfree(bcsp);
+	hu->priv = NULL;
+
 	return 0;
 }
 
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ