diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-10 16:00:23 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-24 15:56:50 -0400 |
commit | de487da8ca5839d057e1f4b57ee3f387e180b800 (patch) | |
tree | 92003bce782f3f1bf49183637d6dac6367c19dd0 /include/linux | |
parent | c8a25900f35e575938c791507894c036c0f2ca7d (diff) |
firewire: cdev: secure add_descriptor ioctl
The access permissions and ownership or ACL of /dev/fw* character device
files will typically be set based on the device type of the respective
nodes, as obtained by firewire-core from descriptors in the device's
configuration ROM. An example policy is to deny write permission by
default but grant write permission to files of AV/C video and audio
devices and IIDC video devices.
The FW_CDEV_IOC_ADD_DESCRIPTOR ioctl could be used to partly subvert
such a policy: Find a device file with relaxed permissions, use the
ioctl to add a descriptor with AV/C marker to the local node's ROM, thus
gain access to the local node's character device file. (This is only
possible if there are udev scripts installed which actively relax
permissions for known device types and if there is a device of such a
type connected.)
Accessibility of the local node's device file is relevant to host
security if the host contains two or more IEEE 1394 link layer
controllers which are plugged into a single bus.
Therefore change the ABI to deny FW_CDEV_IOC_ADD_DESCRIPTOR if the file
belongs to a remote node. (This change has no impact on known
implementers of the ABI: None of them uses the ioctl yet.)
Also clarify the documentation: The ioctl affects all local nodes, not
just one local node.
Cc: stable@kernel.org
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/firewire-cdev.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index de4035792f70..25bc82726ef7 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -394,6 +394,9 @@ struct fw_cdev_initiate_bus_reset { | |||
394 | * If successful, the kernel adds the descriptor and writes back a handle to the | 394 | * If successful, the kernel adds the descriptor and writes back a handle to the |
395 | * kernel-side object to be used for later removal of the descriptor block and | 395 | * kernel-side object to be used for later removal of the descriptor block and |
396 | * immediate key. | 396 | * immediate key. |
397 | * | ||
398 | * This ioctl affects the configuration ROMs of all local nodes. | ||
399 | * The ioctl only succeeds on device files which represent a local node. | ||
397 | */ | 400 | */ |
398 | struct fw_cdev_add_descriptor { | 401 | struct fw_cdev_add_descriptor { |
399 | __u32 immediate; | 402 | __u32 immediate; |
@@ -409,7 +412,7 @@ struct fw_cdev_add_descriptor { | |||
409 | * descriptor was added | 412 | * descriptor was added |
410 | * | 413 | * |
411 | * Remove a descriptor block and accompanying immediate key from the local | 414 | * Remove a descriptor block and accompanying immediate key from the local |
412 | * node's configuration ROM. | 415 | * nodes' configuration ROMs. |
413 | */ | 416 | */ |
414 | struct fw_cdev_remove_descriptor { | 417 | struct fw_cdev_remove_descriptor { |
415 | __u32 handle; | 418 | __u32 handle; |