Dan Rosenberg 252a52aa4f Fix pktcdvd ioctl dev_minor range check
The PKT_CTRL_CMD_STATUS device ioctl retrieves a pointer to a
pktcdvd_device from the global pkt_devs array.  The index into this
array is provided directly by the user and is a signed integer, so the
comparison to ensure that it falls within the bounds of this array will
fail when provided with a negative index.

This can be used to read arbitrary kernel memory or cause a crash due to
an invalid pointer dereference.  This can be exploited by users with
permission to open /dev/pktcdvd/control (on many distributions, this is
readable by group "cdrom").

Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
[ Rather than add a cast, just make the function take the right type -Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-27 16:29:06 -07:00
..
2010-08-07 18:25:00 +02:00
2010-08-07 18:52:30 +02:00
2010-02-22 13:44:45 +01:00
2010-08-07 18:52:30 +02:00
2010-08-07 18:53:03 +02:00
2005-04-16 15:20:36 -07:00
2010-08-07 18:52:31 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2010-05-11 09:02:55 +02:00
2010-08-23 12:33:10 +02:00
2009-10-01 21:17:49 +02:00
2005-04-16 15:20:36 -07:00
2009-03-26 21:15:27 +01:00
2010-08-07 18:25:00 +02:00
2008-10-21 07:48:11 -04:00