From: Brian Gix Date: Mon, 23 Aug 2021 21:57:29 +0000 (-0700) Subject: Bluetooth: mgmt: Disallow legacy MGMT_OP_READ_LOCAL_OOB_EXT_DATA X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=81218cbee980b1d027c429dda56c8c5ac11ccb4d;p=linux.git Bluetooth: mgmt: Disallow legacy MGMT_OP_READ_LOCAL_OOB_EXT_DATA Legacy (v2.0) controllers do not support Extended OOB Data used by SSP. Signed-off-by: Brian Gix Signed-off-by: Luiz Augusto von Dentz --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index cea01e275f1ea..17be5cc528bf4 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -7315,6 +7315,11 @@ static int read_local_oob_ext_data(struct sock *sk, struct hci_dev *hdev, if (!rp) return -ENOMEM; + if (!status && !lmp_ssp_capable(hdev)) { + status = MGMT_STATUS_NOT_SUPPORTED; + eir_len = 0; + } + if (status) goto complete;