Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 150422

Summary: udev: patch - /dev/bus/usb permissions incorrect compared to /proc/bus/usb
Product: Gentoo Linux Reporter: Robin Johnson <robbat2>
Component: [OLD] Core systemAssignee: Greg Kroah-Hartman (RETIRED) <gregkh>
Status: RESOLVED DUPLICATE    
Severity: major CC: base-system, liquidx
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: udev-100-dev-bus-usb-rules.patch

Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-10-07 16:34:20 UTC
udev does not create nodes in /dev/bus/usb with the same permissions that were previously found in /proc/bus/usb.

The permissions in /proc/bus/usb are provided by this mount rule:
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

# find /proc/bus/usb /dev/bus/usb ! -type d  -ls 
  5530    0 -rw-rw-r--   1 root     usb            43 Sep 22 21:09 /proc/bus/usb/003/001
13120873    0 -rw-rw-r--   1 root     usb            50 Oct  7 16:26 /proc/bus/usb/002/002
  4501    0 -rw-rw-r--   1 root     usb            43 Sep 22 21:09 /proc/bus/usb/002/001
  6533    0 -rw-rw-r--   1 root     usb            77 Sep 22 21:09 /proc/bus/usb/001/007
  6394    0 -rw-rw-r--   1 root     usb            77 Sep 22 21:09 /proc/bus/usb/001/006
  5894    0 -rw-rw-r--   1 root     usb            43 Sep 22 21:09 /proc/bus/usb/001/005
  4397    0 -rw-rw-r--   1 root     usb            43 Sep 22 21:09 /proc/bus/usb/001/001
  4263    0 -r--r--r--   1 root     root            0 Oct  7 16:26 /proc/bus/usb/devices
  6492    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/003/001
  6925    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/001/007
  6899    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/001/005
  6855    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/001/002
  6853    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/001/001
  6718    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/001/006
  6165    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/001/003
  6086    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/001/004
  5517    0 crw-r--r--   1 root     root              Sep 22 21:09 /dev/bus/usb/002/001

whereas udev has the following rule that does the incorrect thing:
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"

Find attached a patch against udev to resolve this.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-10-07 16:37:13 UTC
Created attachment 99088 [details, diff]
udev-100-dev-bus-usb-rules.patch

patch for udev rules
Comment 2 SpanKY gentoo-dev 2006-10-07 17:32:04 UTC

*** This bug has been marked as a duplicate of 150223 ***