From: Andreas Kemnade <andreas@kemnade.info>
To: linux-bluetooth@vger.kernel.org
Cc: Andreas Kemnade <andreas@kemnade.info>
Subject: [PATCH BlueZ] gatt: sanitize input at profile registration
Date: Sat, 26 Feb 2022 11:08:36 +0100 [thread overview]
Message-ID: <20220226100836.1540367-1-andreas@kemnade.info> (raw)
Check whether type of UUIDs property of GattProfile1 object
is correct.
---
src/gatt-database.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gatt-database.c b/src/gatt-database.c
index 481222d44..485af04ea 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -3423,6 +3423,11 @@ static struct external_profile *create_profile(struct gatt_app *app,
goto fail;
}
+ if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY) {
+ DBG("UUIDs wrongly formatted");
+ goto fail;
+ }
+
dbus_message_iter_recurse(&iter, &array);
while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_STRING) {
--
2.30.2
next reply other threads:[~2022-02-26 10:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-26 10:08 Andreas Kemnade [this message]
2022-02-26 12:34 ` [BlueZ] gatt: sanitize input at profile registration bluez.test.bot
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=20220226100836.1540367-1-andreas@kemnade.info \
--to=andreas@kemnade.info \
--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