alistair23-linux/drivers
Jeff Moyer 38584c14bb [PATCH] raw: don't allow the creation of a raw device with minor number 0
Minor number 0 (under the raw major) is reserved for the rawctl device
file, which is used to query, set, and unset raw device bindings.  However,
the ioctl interface does not protect the user from specifying a raw device
with minor number 0:

$ sudo ./raw /dev/raw/raw0 /dev/VolGroup00/swap
/dev/raw/raw0:  bound to major 253, minor 2
$ ls -l /dev/rawctl
ls: /dev/rawctl: No such file or directory
$ ls -l /dev/raw/raw0
crw------- 1 root root 162, 0 Jan 12 10:51 /dev/raw/raw0
$ sudo ./raw -qa
Cannot open master raw device '/dev/rawctl' (No such file or directory)

As you can see, this prevents any further raw operations from
succeeding.  The fix (from Steve Fernandez) is quite simple--do not
allow the allocation of minor number 0.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Steven Fernandez <sfernand@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:34 -08:00
..
acorn
acpi [PATCH] wrong order of kzalloc arguments 2007-02-09 08:28:48 -08:00
amba
ata libata: kill ATA_ENABLE_PATA 2007-02-09 17:39:40 -05:00
atm [PATCH] Get rid of "double zeroing" of allocated pages 2007-02-11 10:51:31 -08:00
auxdisplay [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00
base [PATCH] Drop __get_zone_counts() 2007-02-11 10:51:18 -08:00
block [PATCH] pktcdvd: cleanup 2007-02-11 10:51:28 -08:00
bluetooth
cdrom
char [PATCH] raw: don't allow the creation of a raw device with minor number 0 2007-02-11 10:51:34 -08:00
clocksource
connector
cpufreq
crypto Merge branch 'HEAD' of master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6 2007-02-08 15:25:18 -08:00
dio
dma
edac
eisa
fc4
firmware [PATCH] docbook: add edd firmware interfaces 2007-02-11 10:51:32 -08:00
hid
hwmon [PATCH] hwmon: ansify 2007-02-09 09:14:06 -08:00
i2c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
ide [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
ieee1394 ieee1394: fix host device registering when nodemgr disabled 2007-02-08 21:36:22 +01:00
infiniband [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). 2007-02-11 10:51:27 -08:00
input [PATCH] Remove unnecessary memset(0) calls after kzalloc() calls. 2007-02-11 10:51:31 -08:00
isdn [PATCH] Char: tty_wakeup cleanup 2007-02-11 10:51:26 -08:00
kvm [PATCH] misc NULL noise removal 2007-02-09 09:14:07 -08:00
leds
macintosh [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
mca
md [PATCH] remove invalidate_inode_pages() 2007-02-11 10:51:31 -08:00
media [PATCH] Get rid of "double zeroing" of allocated pages 2007-02-11 10:51:31 -08:00
message
mfd
misc [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
mmc [PATCH] TIFM should depend on PCI - TIFM_CORE leads to use of pci primitives 2007-02-09 08:28:48 -08:00
mtd [PATCH] remove invalidate_inode_pages() 2007-02-11 10:51:31 -08:00
net Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-tc 2007-02-09 09:22:36 -08:00
nubus
oprofile
parisc [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
parport
pci devres: device resource management 2007-02-09 17:39:36 -05:00
pcmcia [PATCH] m32r: class_device -> device fallout 2007-02-09 08:28:48 -08:00
pnp [PATCH] Remove unnecessary memset(0) calls after kzalloc() calls. 2007-02-11 10:51:31 -08:00
ps3 [POWERPC] PS3: Move vuart declarations to ps3.h 2007-02-07 14:03:20 +11:00
rapidio
rtc [PATCH] RTC framework driver for CMOS RTCs 2007-02-11 10:51:32 -08:00
s390 [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
sbus
scsi [PATCH] Get rid of "double zeroing" of allocated pages 2007-02-11 10:51:31 -08:00
serial [PATCH] serial: support for new board 2007-02-11 10:51:33 -08:00
sh
sn [PATCH] IOC3/IOC4: PCI mem space resources 2007-02-11 10:51:25 -08:00
spi Revert "Driver core: convert SPI code to use struct device" 2007-02-07 21:34:08 -08:00
tc [PATCH] Char: tty_wakeup cleanup 2007-02-11 10:51:26 -08:00
telephony
usb [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
video [TC] pmagb-b-fb: Convert to the driver model 2007-02-09 16:23:18 +00:00
w1
zorro
Kconfig [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00
Makefile [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00