[linux] 06/18: HID: core: prevent out-of-bound readings (CVE-2016-7915)
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Dec 29 03:44:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch jessie
in repository linux.
commit d07602d9df4b961b87179f815375d09ebf7b5cd8
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Wed Dec 28 23:05:26 2016 +0000
HID: core: prevent out-of-bound readings (CVE-2016-7915)
---
debian/changelog | 1 +
.../hid-core-prevent-out-of-bound-readings.patch | 43 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 45 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 9c5380c..a4f3252 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -493,6 +493,7 @@ linux (3.16.39-1) UNRELEASED; urgency=medium
* perf: Fix race in swevent hash (CVE-2015-8963)
* tty: Prevent ldisc drivers from re-using stale tty fields (CVE-2015-8964)
* usb: gadget: f_fs: Fix use-after-free (CVE-2016-7912)
+ * HID: core: prevent out-of-bound readings (CVE-2016-7915)
[ Julien Cristau ]
* hwrng: Add chaoskey driver, backported from 4.8 (Closes: #839616)
diff --git a/debian/patches/bugfix/all/hid-core-prevent-out-of-bound-readings.patch b/debian/patches/bugfix/all/hid-core-prevent-out-of-bound-readings.patch
new file mode 100644
index 0000000..f3a979a
--- /dev/null
+++ b/debian/patches/bugfix/all/hid-core-prevent-out-of-bound-readings.patch
@@ -0,0 +1,43 @@
+From: Benjamin Tissoires <benjamin.tissoires at redhat.com>
+Date: Tue, 19 Jan 2016 12:34:58 +0100
+Subject: HID: core: prevent out-of-bound readings
+Origin: https://git.kernel.org/linus/50220dead1650609206efe91f0cc116132d59b3f
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2016-7915
+
+Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
+out-of-bound readings.
+
+The fields are allocated up to MAX_USAGE, meaning that potentially, we do
+not have enough fields to fit the incoming values.
+Add checks and silence KASAN.
+
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires at redhat.com>
+Signed-off-by: Jiri Kosina <jkosina at suse.cz>
+---
+ drivers/hid/hid-core.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -1208,6 +1208,7 @@ static void hid_input_field(struct hid_d
+ /* Ignore report if ErrorRollOver */
+ if (!(field->flags & HID_MAIN_ITEM_VARIABLE) &&
+ value[n] >= min && value[n] <= max &&
++ value[n] - min < field->maxusage &&
+ field->usage[value[n] - min].hid == HID_UP_KEYBOARD + 1)
+ goto exit;
+ }
+@@ -1220,11 +1221,13 @@ static void hid_input_field(struct hid_d
+ }
+
+ if (field->value[n] >= min && field->value[n] <= max
++ && field->value[n] - min < field->maxusage
+ && field->usage[field->value[n] - min].hid
+ && search(value, field->value[n], count))
+ hid_process_event(hid, field, &field->usage[field->value[n] - min], 0, interrupt);
+
+ if (value[n] >= min && value[n] <= max
++ && value[n] - min < field->maxusage
+ && field->usage[value[n] - min].hid
+ && search(field->value, value[n], count))
+ hid_process_event(hid, field, &field->usage[value[n] - min], 1, interrupt);
diff --git a/debian/patches/series b/debian/patches/series
index 5ad61a3..e34cbbe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -661,6 +661,7 @@ bugfix/all/sg-fix-double-free-when-drives-detach-during-sg_io.patch
bugfix/all/perf-fix-race-in-swevent-hash.patch
bugfix/all/tty-prevent-ldisc-drivers-from-re-using-stale-tty-fi.patch
bugfix/all/usb-gadget-f_fs-fix-use-after-free.patch
+bugfix/all/hid-core-prevent-out-of-bound-readings.patch
# Fix ABI changes
debian/of-fix-abi-changes.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list