Report forwarded to debian-bugs-dist@lists.debian.org, Martin Maurer <fireflier@gibraltar.at>: Bug#431332; Package fireflier-server.
(full text, mbox, link).
Acknowledgement sent to Steve Kemp <skx@debian.org>:
New Bug report received and forwarded. Copy sent to Martin Maurer <fireflier@gibraltar.at>.
(full text, mbox, link).
Package: fireflier-server
Version: 1.1.6-3
Severity: grave
Usertags: sourcescan
*** Please type your report below this line ***
Security issue: CVE-2007-2837.
The server, fireflierd, runs with root privileges and the code
contains this gem which I think speaks for itself:
string getRule(unsigned int chainid, int rulenum)
{
...
cmd="rm -f /tmp/fireflier.rules && touch /tmp/fireflier.rules &&
chmod 0700 /tmp/fireflier.rules && ";
cmd+=IPTABLES_SAVE;
cmd+=" > /tmp/fireflier.rules";
if(DEBUG)
cout<<"cmd: "<<cmd<<endl;
system(cmd.c_str());
...
}
This contains several race conditions, and can be trivially exploited to
remove any file on the server as root.
For example run this as a user inside GNU screen:
skx@vain:~$ while true; do ln -s /etc/passwd /tmp/fireflier.rules; done
Wait for a root user to fetch/update/delete a rule using one of the available
clients, and the /etc/passwd file will be removed.
Steve
--
# Kink-Friendly Dating
http://ctrl-alt-date.com/
Information forwarded to debian-bugs-dist@lists.debian.org, Martin Maurer <fireflier@gibraltar.at>: Bug#431332; Package fireflier-server.
(full text, mbox, link).
Acknowledgement sent to Martin MAURER <martinmaurer@gmx.at>:
Extra info received and forwarded to list. Copy sent to Martin Maurer <fireflier@gibraltar.at>.
(full text, mbox, link).
Hi,
I agree that this code could become a problem, although I wasn't able to
reproduce using screen and the command written in your mail.
Anyways - what really might happen is that the file is overwritten, not
deleted, as rm should delete the link not the file the link points to.
Nevertheless, this doesnt make a big difference, so I will add your fix
to the official version of fireflier.
thanks,
Martin Maurer
(main developer, and original author of that code)
Information forwarded to debian-bugs-dist@lists.debian.org, Martin Maurer <fireflier@gibraltar.at>: Bug#431332; Package fireflier-server.
(full text, mbox, link).
Acknowledgement sent to Martin MAURER <martinmaurer@gmx.at>:
Extra info received and forwarded to list. Copy sent to Martin Maurer <fireflier@gibraltar.at>.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Martin Maurer <fireflier@gibraltar.at>: Bug#431332; Package fireflier-server.
(full text, mbox, link).
Acknowledgement sent to Steve Kemp <skx@debian.org>:
Extra info received and forwarded to list. Copy sent to Martin Maurer <fireflier@gibraltar.at>.
(full text, mbox, link).
On Sun Jul 01, 2007 at 21:56:43 +0200, Martin MAURER wrote:
> I agree that this code could become a problem, although I wasn't able to
> reproduce using screen and the command written in your mail.
I could reproduce this using the -qt version of the client. First of
all adding some rules, then bringing up the rule list and removing one
of them.
> Anyways - what really might happen is that the file is overwritten, not
> deleted, as rm should delete the link not the file the link points to.
That is generally true. I'm trying to remember whether it was
unlinked and I'm 99% certain it was, rather than truncated/trashed.
> Nevertheless, this doesnt make a big difference, so I will add your fix
> to the official version of fireflier.
Thanks a lot.
Steve
--
# Commercial Debian GNU/Linux Support
http://www.linux-administration.org/
Tags added: security
Request was from Touko Korpela <tkorpela@phnet.fi>
to control@bugs.debian.org.
(Sun, 01 Jul 2007 21:06:04 GMT) (full text, mbox, link).
Reply sent to Martin MAURER <martinmaurer@gmx.at>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Steve Kemp <skx@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
I uploaded fireflier-1.1.7 to unstable, which fixes this bug by applying
the changes from Steve Kemp to fireflier-1.1.6.
In fireflier-1.1.7 no other changes were done.
thanks,
Martin
Bug marked as fixed in version 1.1.7.
Request was from Touko Korpela <tkorpela@phnet.fi>
to control@bugs.debian.org.
(Sun, 08 Jul 2007 13:33:03 GMT) (full text, mbox, link).
Bug marked as fixed in version 1.1.6-3etch1.
Request was from Touko Korpela <tkorpela@phnet.fi>
to control@bugs.debian.org.
(Fri, 20 Jul 2007 23:03:03 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 27 Dec 2007 07:28:24 GMT) (full text, mbox, link).
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.