lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1301311653090.23853@pobox.suse.cz>
Date:	Thu, 31 Jan 2013 16:54:16 +0100 (CET)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Simon Wood <simon@...gewell.org>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	rosegardener@...eode.co.uk
Subject: Re: [PATCH 1/5] USB: HID: SRW-S1 Gaming Wheel Driver

On Thu, 31 Jan 2013, simon@...gewell.org wrote:

> > I thought we converged to hid-steelseries name in the end originally?
> >
> > If you agree, I'll change it and apply.
> 
> I'd be OK with that,

Thanks. I will also apply this patch on top, otherwise we'll be corrupting 
memory in steelseries_srws1_probe() here:

	drv_data->led[SRWS1_NUMBER_LEDS] = led;



From: Jiri Kosina <jkosina@...e.cz>
Subject: [PATCH] HID: steelseries: fix out of bound array access

The last field of the driver_data->leds[] array is used to store the
special toggle for setting all leds simultaneously, so we need to allocate
appropriate number of led_classdev pointers.

Signed-off-by: Jiri Kosina <jkosina@...e.cz>
---
 drivers/hid/hid-steelseries.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c
index 365bc9e..2ed995c 100644
--- a/drivers/hid/hid-steelseries.c
+++ b/drivers/hid/hid-steelseries.c
@@ -23,7 +23,8 @@
 #define SRWS1_NUMBER_LEDS 15
 struct steelseries_srws1_data {
 	__u16 led_state;
-	struct led_classdev *led[SRWS1_NUMBER_LEDS];
+	/* the last element is used for setting all leds simultaneously */
+	struct led_classdev *led[SRWS1_NUMBER_LEDS + 1];
 };
 #endif
 
-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ