Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2214208pxb; Mon, 23 Aug 2021 14:59:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTPe8lAWZXpVsbBxIR6nrv/3Kw7JF8Kboz7ulQOETLP1ej0zx00sD/VoqTanCg99m0NwTi X-Received: by 2002:a5e:dc02:: with SMTP id b2mr27539272iok.197.1629755970678; Mon, 23 Aug 2021 14:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629755970; cv=none; d=google.com; s=arc-20160816; b=pvplDLUBAfBq7jAYrp6/F8MhQVC7x7q9Ncq+pEnMViZs60jwpnGDNCiqrk8HBqFjry yP6xKmk2SMBpFP7/hv1rwrdCyjv/9HePKg5iotKXkD+Va4NmEUyp9jxye3AE1Uq66nfs 3zgQ6uCLLzJVjALP6Aon/a3EbCXl1GKNoczR29W8CgDrSN7OV8qJSJgm8BcyycqS+Lxl 5xtRJEZfYj3k3svMoGOCqCEjfgGqF6p5V0Zf0vtKXSzGSUdWKCPSLMH/mT9m4XwbTw0q rxIzoOcUYgT2QiVEvE1lFN6tkKnXF191j54DAuztvQFo3QQA5BhZS9/liHMisj6zrwXL BtRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+E+mdFRABbcEo0abjZx7uIwLgRHxyuuUG2e7IfHCjQg=; b=HMsqPenWELQZSwnu3hPx2adgAfiRyvNxfKrSqi1wBXh05te3Q6b3+LQFmjoAIXc2+Z 44LOkLnjBXc7FAN3WyxhQLRdNBqHSnjAH66ECeQiQtfG2ejfBLbgf0rI/RNOdoKDMDPV 8v5MNsdu4Ng8ledJQt0W8GDvku/CdSFSaXporCaJHuAqxpWPcJMI/wYQhDqa6VLYhM+t 1LUoeDXbEcs18W1zRDCFw8vDEI015e5YLmvMitHK3KfmJ2Wv94nggs7gIphyEXSqgRBj ft5mtz8wHRlgr1SJQvlCQKsJk6g0gs8DRxFfJa2Q1AOeRPLK46Clis0g0+NYQ8PtWsku ZQwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si16102545ilq.19.2021.08.23.14.58.39; Mon, 23 Aug 2021 14:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232931AbhHWV6W (ORCPT + 99 others); Mon, 23 Aug 2021 17:58:22 -0400 Received: from mga01.intel.com ([192.55.52.88]:48793 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232898AbhHWV6W (ORCPT ); Mon, 23 Aug 2021 17:58:22 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10085"; a="239330086" X-IronPort-AV: E=Sophos;i="5.84,344,1620716400"; d="scan'208";a="239330086" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2021 14:57:39 -0700 X-IronPort-AV: E=Sophos;i="5.84,344,1620716400"; d="scan'208";a="526284460" Received: from yingliyu-mobl.amr.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.255.229.205]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2021 14:57:38 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, brian.gix@intel.com, luiz.von.dentz@intel.com, hj.tedd.an@gmail.com Subject: [PATCH] bluetooth: mgmt: Disallow legacy MGMT_OP_READ_LOCAL_OOB_EXT_DATA Date: Mon, 23 Aug 2021 14:57:29 -0700 Message-Id: <20210823215729.87837-1-brian.gix@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Legacy (v2.0) controllers do not support Extended OOB Data used by SSP. Signed-off-by: Brian Gix --- net/bluetooth/mgmt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 1e21e014efd2..77ea94403cd6 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; -- 2.31.1