From: Alain Michaud <alainm@chromium.org>
To: linux-bluetooth@vger.kernel.org
Cc: Alain Michaud <alainm@chromium.org>
Subject: [BlueZ PATCH 1/2] HOGP must only accept data from bonded devices.
Date: Tue, 10 Mar 2020 02:35:16 +0000 [thread overview]
Message-ID: <20200310023516.209146-2-alainm@chromium.org> (raw)
In-Reply-To: <20200310023516.209146-1-alainm@chromium.org>
HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding.
Reference:
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm
---
profiles/input/hog.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 83c017dcb..dfac68921 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -186,6 +186,10 @@ static int hog_accept(struct btd_service *service)
return -EINVAL;
}
+ /* HOGP 1.0 Section 6.1 requires bonding */
+ if (!device_is_bonded(device, btd_device_get_bdaddr_type(device)))
+ return -ECONNREFUSED;
+
/* TODO: Replace GAttrib with bt_gatt_client */
bt_hog_attach(dev->hog, attrib);
--
2.25.1.481.gfbce0eb801-goog
next prev parent reply other threads:[~2020-03-10 2:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 2:35 [BlueZ PATCH 0/2] HID and HOGP connections from non-bonded devices Alain Michaud
2020-03-10 2:35 ` Alain Michaud [this message]
2020-03-10 6:04 ` [BlueZ PATCH 1/2] HOGP must only accept data from bonded devices Luiz Augusto von Dentz
2020-03-10 2:35 ` [BlueZ PATCH 2/2] HID accepts bonded device connections only Alain Michaud
2020-03-10 6:22 ` Luiz Augusto von Dentz
2020-03-10 5:24 ` [BlueZ PATCH 0/2] HID and HOGP connections from non-bonded devices Marcel Holtmann
2020-03-10 6:27 ` Luiz Augusto von Dentz
2020-03-10 12:30 ` Alain Michaud
2020-03-10 17:12 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200310023516.209146-2-alainm@chromium.org \
--to=alainm@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).