diff options
author | Jeff Moyer <jmoyer@redhat.com> | 2007-02-10 10:46:10 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 19:51:34 +0100 |
commit | 38584c14bbba02d8aedace335073b30e49de66a0 (patch) | |
tree | 52f8fb95c810c807b1203e56f30d4c27ecef407b /arch/ia64 | |
parent | [PATCH] audit: fix audit_filter_user_rules() initialization bug (diff) | |
download | linux-38584c14bbba02d8aedace335073b30e49de66a0.tar.xz linux-38584c14bbba02d8aedace335073b30e49de66a0.zip |
[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>
Diffstat (limited to 'arch/ia64')
0 files changed, 0 insertions, 0 deletions