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]
Date:   Tue, 4 Apr 2023 09:50:36 +0800
From:   Chenyuan Mi <michenyuan@...wei.com>
To:     <isdn@...ux-pingi.de>
CC:     <marcel@...tmann.org>, <johan.hedberg@...il.com>,
        <luiz.dentz@...il.com>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
        <netdev@...r.kernel.org>, <linux-bluetooth@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <michenyuan@...wei.com>
Subject: Re: [PATCH v2 net-next] bluetooth: unregister correct BTPROTO for CMTP

This bug does not appear to cause serious security problem.

The function 'bt_sock_unregister' takes its parameter as an index and 
NULLs the corresponding element of 'bt_proto' which is an array of 
pointers. When 'bt_proto' dereferences each element, it would check 
whether the element is empty or not. Therefore, the problem of null 
pointer deference does not occur.

Found by inspection.

Fixes: 8c8de589cedd ("Bluetooth: Added /proc/net/cmtp via bt_procfs_init()")
Signed-off-by: Chenyuan Mi <michenyuan@...wei.com>
---
 net/bluetooth/cmtp/sock.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
index 96d49d9fae96..cf4370055ce2 100644
--- a/net/bluetooth/cmtp/sock.c
+++ b/net/bluetooth/cmtp/sock.c
@@ -250,7 +250,7 @@ int cmtp_init_sockets(void)
 	err = bt_procfs_init(&init_net, "cmtp", &cmtp_sk_list, NULL);
 	if (err < 0) {
 		BT_ERR("Failed to create CMTP proc file");
-		bt_sock_unregister(BTPROTO_HIDP);
+		bt_sock_unregister(BTPROTO_CMTP);
 		goto error;
 	}
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ