summaryrefslogtreecommitdiff
path: root/scripts/subarch.include
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2024-10-16 18:24:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-17 09:36:52 +0300
commit3ea36dc8ddd72d92d737612507f98dfaf3b77c3f (patch)
tree71dc9a3f7b55b84b211e0259aa9870aa9cdf5c9d /scripts/subarch.include
parent7b5a58952fc3b51905c2963647485565df1e5e26 (diff)
downloadlinux-3ea36dc8ddd72d92d737612507f98dfaf3b77c3f.tar.xz
usb: require FMODE_WRITE for usbdev_mmap()
usbdev_mmap() creates VMAs which can only be used through usbdev_do_ioctl(), which requires FMODE_WRITE; so usbdev_mmap() is only useful with FMODE_WRITE. On typical Linux systems, files at /dev/bus/usb/*/* are mode 0664, so UIDs without any special privileges can't use usbdev_do_ioctl(), but they can still execute the usbdev_mmap() codepath. Check for FMODE_WRITE in usbdev_mmap() to reduce attack surface a little bit. Signed-off-by: Jann Horn <jannh@google.com> Link: https://lore.kernel.org/r/20241016-usbdev-mmap-require-write-v1-1-6f8256414d5c@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/subarch.include')
0 files changed, 0 insertions, 0 deletions