Frugalware

Please read the http://frugalware.org/docs/bugs page if you are new to bugreporting!
Tasklist

FS#3052 - [SEC] /var/run/netconfig has umask permissions

Attached to Project: Frugalware
Opened by Karl (yggjg) - Friday, 02 May 2008, 15:39 GMT+2
Last edited by Miklos Vajna (vmiklos) - Monday, 05 May 2008, 14:56 GMT+2
Task Type Bug Report
Category Base system
Status Closed
Assigned To Miklos Vajna (vmiklos)
Operating System i686
Severity Medium
Priority Normal
Reported Version -current
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Upon "netconfig start", /var/run/netconfig is created with permissions according to umask in the environment. Thus if umask is 000, the file will be writeable by everyone. This is the case for example when you have "netconfig start" in a suspend/resume script that is executed by acpid.

If a user writes the name of a network profile in /var/run/netconfig, that network profile will be activated the next time root does "netconfig restart". Since this may be a security problem, netconfig should make sure that /var/run/netconfig has restrictive permissions when the file is created.

Steps to reproduce:
# netconfig stop
# umask 000
# netconfig start

Actual results:
$ ls -l /var/run/netconfig
-rw-rw-rw- 1 root root 7 2 maj 15.10 /var/run/netconfig

Expected results:
$ ls -l /var/run/netconfig
-rw-r--r-- 1 root root 7 2 maj 15.10 /var/run/netconfig

How often does this happen?
Every time

Additional information:
Given above actual results, the following is possible.

$ echo networkprofile >/var/run/netconfig
# netconfig restart
# ifconfig
(configuration is according to "networkprofile")
This task depends upon

Closed by  Miklos Vajna (vmiklos)
Monday, 05 May 2008, 14:56 GMT+2
Reason for closing:  Fixed
Additional comments about closing:  FSA440
Comment by Miklos Vajna (vmiklos) - Friday, 02 May 2008, 15:57 GMT+2
ok, this is a bug but i don't think this is exploitable, since a user can't create profiles. (that would execute dangerous commands)
Comment by Karl (yggjg) - Friday, 02 May 2008, 18:41 GMT+2
It could be exploited to reconfigure the network to another existing profile which would imply denial of service.
Comment by Miklos Vajna (vmiklos) - Saturday, 03 May 2008, 03:15 GMT+2 Comment by Miklos Vajna (vmiklos) - Saturday, 03 May 2008, 03:54 GMT+2
  • Field changed: Status (Unconfirmed → Fixed in -current)
frugalwareutils-0.8.0-2-i686
Comment by crazy (bugs) - Saturday, 03 May 2008, 16:37 GMT+2
this update broke stuff , please see  FS#3054  and  FS#3056 
Comment by Miklos Vajna (vmiklos) - Saturday, 03 May 2008, 22:13 GMT+2
both fixed, it was a missing -lresolv. i think older gccs added it automatically.
Comment by Karl (yggjg) - Sunday, 04 May 2008, 02:31 GMT+2
Seems to work fine now. Thank you Miklos.
Comment by Miklos Vajna (vmiklos) - Sunday, 04 May 2008, 13:39 GMT+2
  • Field changed: Status (Fixed in -current → Waiting for syncpkgd)
5ab3aa7f6771d97aff6174dffc229878f41d6d5d in stable

Loading...