Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 25 Feb 2013 14:27:47 +0100
From: Helmut Grohne <>
Cc: Roland Mas <>
Subject: fusionforge CVE-2013-1423 multiple privilege escalations


I am publicly disclosing fusionforge CVE-2013-1423 today. On the 25th of
January I reported one of these issues to the Debian security team and
the fusionforge maintainers. In the process of fixing the issue a number
of further issues surfaced. All of these issues currently covered by the
single CVE-2013-1423 have in common that they related to privileged
operations not properly checking their environment and thus leading to
privilege escalation. Let me give an easy to exploit example.

Quoting deb-specific/ (fusionforge 5.2-1):
|       $home_dir = $homedir_prefix.'/'.$username;
|       unless (-d $home_dir.'/incoming') {
|           mkdir $home_dir.'/incoming', 0755;
|       }
|       my $realuid=get_file_owner_uid($home_dir);
|       if ($uid eq $realuid){
|               system("chown $uid $home_dir/incoming");
|               system("chmod 0755 $home_dir/incoming");

This code is executed as root in a cron job. By replacing ~/incoming
with a hard link to some other file (.e.g. an .ssh/authorized_keys file
from a different user) an attacker can gain ownership of files.

The initial report related to plugins/scmcvs/cronjobs/ssh_create.php
which contained a chown to ~user/.ssh which is user controlled.

Most of the issues relate to usage of chown or chmod on objects
controlled by a user. These issues have been avoided carrying out
operations on user controlled files with the effective permission of the
user (seteuid). Another source was TOCTOU race conditions which have
been avoided by using O_EXCL which is file mode "x" in php. Also some
file permission were only fixed after closing the file (information
disclosure) which is now done at open time by using umask.

Roland Mas iteratively updated the sources with me giving feedback on
issues. The resulting patches have been commited to the respective git
branches. Please have a look at those patches for further details.


Here is a list of files affected:

contrib/gforge-3.0-cronjobs.patch (removed)
deb-specific/ (removed)
utils/cvs1/ (removed)

Finally I would like to thank Roland Mas for his thorough work on these
issues, his quick reaction and the nice interaction.


Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.