Bug 560050 - Unsafe udev rules
Summary: Unsafe udev rules
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: argyllcms
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-29 18:44 UTC by David Zeuthen
Modified: 2013-03-06 04:01 UTC (History)
6 users (show)

Fixed In Version: argyllcms-1.0.4-5.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-04 00:22:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch which takes the udev rules frile from my friendly work, hargyllcms (2.77 KB, patch)
2010-02-01 08:59 UTC, Richard Hughes
no flags Details | Diff

Description David Zeuthen 2010-01-29 18:44:27 UTC
From /lib/udev/rules.d/55-Argyll.rules which is part of argyllcms-1.0.4-4.fc13.x86_64

 # Enable serial port connected instruments connected on first two ports.
 KERNEL=="ttyS[01]", MODE="666"

 # Enable serial port connected instruments on USB serial converteds connected
 # on  first two ports.
 KERNEL=="ttyUSB[01]", MODE="666"

This gives world-write read/write access to any tty device. Clearly this is unwanted.

Comment 1 David Zeuthen 2010-01-29 18:46:20 UTC
Instead, Argyll should use the udev ACL stuff (to ensure we only grant access to active local sessions) and key off USB vendor/product ids (to ensure we don't grant access to any random tty device).

Comment 2 David Zeuthen 2010-01-29 18:54:01 UTC
Adding Richard to the Cc as he did this change

* Fri Oct 30 2009 Richard Hughes <rhughes> - 1.0.4-3
- Install the udev rules file so users can get the correct device
  permissions on F12 and above which does not use HAL policy files.

Comment 3 Gwyn Ciesla 2010-01-29 18:57:00 UTC
I think that's a great idea.

I know nothing about udev rules, and have no idea what vendor/product ids we'd use. 

:)

Thoughts?

Comment 4 Richard Hughes 2010-02-01 08:49:09 UTC
(In reply to comment #1)
> Instead, Argyll should use the udev ACL stuff (to ensure we only grant access
> to active local sessions) and key off USB vendor/product ids (to ensure we
> don't grant access to any random tty device).    

Agreed, I just took the upstream rules and added them to the Fedora package. Tbh, I don't think we want any of the tty ports changed; if you've got an old and crusty photospectromiter then you should already know how to chmod the device files.

I'll fix this now. At some point we want to switch to 1.0.0 anyway, but I'll do the update for the pre-release now.

Comment 5 Richard Hughes 2010-02-01 08:59:37 UTC
Created attachment 387989 [details]
patch which takes the udev rules frile from my friendly work, hargyllcms

I've backported this patch, which adds acl-based access and removes all the tty port logic as it's basically unsafe.

Comment 6 David Zeuthen 2010-02-01 15:51:03 UTC
(In reply to comment #4)
> Tbh, I don't think we want any of the tty ports changed; if you've got an old
> and crusty photospectromiter then you should already know how to chmod the
> device files.

Sounds fine to me - we can't reliably autodetect hardware on these ports anyway.

Comment 7 Fedora Update System 2010-02-05 01:46:59 UTC
argyllcms-1.0.4-5.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update argyllcms'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1493

Comment 8 Fedora Update System 2010-03-04 00:22:46 UTC
argyllcms-1.0.4-5.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Graeme Gill 2010-03-18 05:27:35 UTC
(In reply to comment #4)

> Agreed, I just took the upstream rules and added them to the Fedora package.
> Tbh, I don't think we want any of the tty ports changed; if you've got an old
> and crusty photospectromiter then you should already know how to chmod the
> device files.

I don't agree - if Linux doesn't have an elegant way of allowing users to
use their tty ports, then one should be added - urgently !

In the mean time, people want to get work done, and really don't
care about theoretical vulnerabilities in tty permissions.


Note You need to log in before you can comment on or make changes to this bug.