This is a note to let you know that I've just added the patch titled

    HID: picolcd: sanity check report size in raw_event() callback

to the 3.10-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hid-picolcd-sanity-check-report-size-in-raw_event-callback.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 844817e47eef14141cf59b8d5ac08dd11c0a9189 Mon Sep 17 00:00:00 2001
From: Jiri Kosina <[email protected]>
Date: Wed, 27 Aug 2014 09:13:15 +0200
Subject: HID: picolcd: sanity check report size in raw_event() callback

From: Jiri Kosina <[email protected]>

commit 844817e47eef14141cf59b8d5ac08dd11c0a9189 upstream.

The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that raw_data
that we hold in picolcd_pending structure are always kept within proper
bounds.

Reported-by: Steven Vittitoe <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/hid/hid-picolcd_core.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/hid/hid-picolcd_core.c
+++ b/drivers/hid/hid-picolcd_core.c
@@ -350,6 +350,12 @@ static int picolcd_raw_event(struct hid_
        if (!data)
                return 1;
 
+       if (size > 64) {
+               hid_warn(hdev, "invalid size value (%d) for picolcd raw 
event\n",
+                               size);
+               return 0;
+       }
+
        if (report->id == REPORT_KEY_STATE) {
                if (data->input_keys)
                        ret = picolcd_raw_keypad(data, report, raw_data+1, 
size-1);


Patches currently in stable-queue which might be from [email protected] are

queue-3.10/hid-logitech-dj-prevent-false-errors-to-be-shown.patch
queue-3.10/hid-magicmouse-sanity-check-report-size-in-raw_event-callback.patch
queue-3.10/drm-i915-read-head-register-back-in-init_ring_common-to-enforce-ordering.patch
queue-3.10/hid-picolcd-sanity-check-report-size-in-raw_event-callback.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to