diff options
author | Jay Fenlason <fenlason@redhat.com> | 2008-05-16 11:15:23 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-05-20 18:24:17 +0200 |
commit | 551f4cb9de716ffcdaf968c99a450c22ff12e8c3 (patch) | |
tree | 97ad7f4a9bf073a8b8c9c61ae44eb9f1c41c0698 /drivers/ssb/pcihost_wrapper.c | |
parent | 93c596f7d611b379302bbdd26f31acdf72f4859a (diff) |
firewire: prevent userspace from accessing shut down devices
If userspace ignores the POLLERR bit from poll(), and only attempts to
read() the device when POLLIN is set, it can still make ioctl() calls on
a device that has been removed from the system. The node_id and
generation returned by GET_INFO will be outdated, but INITIATE_BUS_RESET
would still cause a bus reset, and GET_CYCLE_TIMER will return data.
And if you guess the correct generation to use, you can send requests to
a different device on the bus, and get responses back.
This patch prevents open, ioctl, compat_ioctl, and mmap against shutdown
devices.
Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ssb/pcihost_wrapper.c')
0 files changed, 0 insertions, 0 deletions