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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 23 Jan 2022 06:57:09 +0100 From: Soenke Huster <soenke.huster@...oes.de> To: Marcel Holtmann <marcel@...tmann.org>, Johan Hedberg <johan.hedberg@...il.com>, Luiz Augusto von Dentz <luiz.dentz@...il.com>, "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org> Cc: Soenke Huster <soenke.huster@...oes.de>, linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH v2] Bluetooth: msft: fix null pointer deref on msft_monitor_device_evt msft_find_handle_data returns NULL if it can't find the handle. Therefore, handle_data must be checked, otherwise a null pointer is dereferenced. Signed-off-by: Soenke Huster <soenke.huster@...oes.de> --- v2: Remove empty line net/bluetooth/msft.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c index 484540855863..9a3d77d3ca86 100644 --- a/net/bluetooth/msft.c +++ b/net/bluetooth/msft.c @@ -704,6 +704,8 @@ static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb) ev->monitor_state, &ev->bdaddr); handle_data = msft_find_handle_data(hdev, ev->monitor_handle, false); + if (!handle_data) + return; switch (ev->addr_type) { case ADDR_LE_DEV_PUBLIC: -- 2.34.1
Powered by blists - more mailing lists