From: bugzilla-daemon@bugzilla.kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 202999] New: The HID Parser has some bugs and limitations
Date: Fri, 22 Mar 2019 07:25:50 +0000 [thread overview]
Message-ID: <bug-202999-62941@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=202999
Bug ID: 202999
Summary: The HID Parser has some bugs and limitations
Product: Drivers
Version: 2.5
Kernel Version: 4.9
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Bluetooth
Assignee: linux-bluetooth@vger.kernel.org
Reporter: rzimmerm@logitech.com
Regression: No
From hid-core.c:
case HID_GLOBAL_ITEM_TAG_REPORT_SIZE:
parser->global.report_size = item_udata(item);
if (parser->global.report_size > 96) {
dbg_hid("invalid report_size %d\n",
parser->global.report_size);
return -1;
}
return 0;
The 96 bits limit is arbitrary. For new categories of devices this can be a
limitation (in our case an array of structure larger than 12 bytes) I would
recommend either no limit (dynamic) or something like 64 * 8 bits.
if (parser->global.logical_maximum < parser->global.logical_minimum) {
dbg_hid("logical range invalid %d %d\n",
parser->global.logical_minimum, parser->global.logical_maximum);
return -1;
}
If the item is 32bit and the logical extent is (0 - 0xFFFFFFFF), the
logical_maximum will flip sign as it is a 32 bit signed variable and the
assertion will fail.
Those issue are not found on Windows/MacOS/iOS
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2019-03-22 7:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bug-202999-62941@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.