NoBaloney2
NoBaloney Internet Svcs.
Thanks, John. Starting to contact clients now.
Jeff
Jeff
I hate cpanels stance on this so we have created a patch and have been using for some time. It turns FollowSymLinks into SymLinksIfOwnerMatch at the apache source code level.
We currently are working on rewriting the patch, and part of apache to take care of some possible race conditions. But given the rare race condition possibility, this is by far a better option than causing everyone to have to reconfigure their .htaccess files or allowing your server to be wide open to attack.
How to install our patch (apache 2.2 only):
Code:wget http://layer1.rack911.com/before_apache_make -O /scripts/before_apache_make chmod 700 /scripts/before_apache_make #Rebuild apache after. /scripts/easyapache
If you have any issues, let us know, we would be interested in hearing it.
If you want to thank us, your free to do that aswell.
When trying to access a file located in another account via a symlink, you will see this in the error log:
Code:[Sun Nov 06 05:06:23 2011] [error] [client xxxxxx] Symbolic link not allowed or link target not accessible: /home/xxxxx/public_html/1/confirm.txt
Also, find out if your already a victim:
Code:find /home*/*/public_html -type l
cd /usr/local/directadmin/custombuild
./build update
./build set harden-symlinks-patch yes
./build set secure_htaccess no
./build apache
./build rewrite_confs
./build php n
Hello,
Done.
If you wish to use the StevenC/Rack911 patch, it's now in custombuild. It's off by default.
Right now, it's just in files1, so please allow 24 hours if you're using a files mirror for rsync propogation.
To use it:Some cases, ./build apache will delete modules from /usr/lib/apache... so if that happens, you'll also need to doCode:cd /usr/local/directadmin/custombuild ./build update ./build set harden-symlinks-patch yes ./build set secure_htaccess no ./build apache ./build rewrite_confs
and for any other missing modules.Code:./build php n
What this patch does, is allows Users to use everything as it was before, including the FollowSymLinks option.
However, the functionality of FollowSymLinks is no longer the insecure type as it was before.
The new functionality of FollowSymLinks with this patch will simply duplicate the functionality of the more secure SymLinksIfOwnerMatch.
This will allow the secure_htaccess option to be set to "no" (old httpd config setup), but still solve the linking issue with regards to security.
Once testing is under the belt for this patch, we'll set secure_htaccess=no as the default, and harden-symlinks-patch=yes as the default.
John
## the following line is needed to allow Download-By-Redirect to work
Options +FollowSymLinks
Will this keep on working in good order after doing the patch?
Hello,
Done.
If you wish to use the StevenC/Rack911 patch, it's now in custombuild. It's off by default.
Right now, it's just in files1, so please allow 24 hours if you're using a files mirror for rsync propogation.
To use it:Some cases, ./build apache will delete modules from /usr/lib/apache... so if that happens, you'll also need to doCode:cd /usr/local/directadmin/custombuild ./build update ./build set harden-symlinks-patch yes ./build set secure_htaccess no ./build apache ./build rewrite_confs
and for any other missing modules.Code:./build php n
What this patch does, is allows Users to use everything as it was before, including the FollowSymLinks option.
However, the functionality of FollowSymLinks is no longer the insecure type as it was before.
The new functionality of FollowSymLinks with this patch will simply duplicate the functionality of the more secure SymLinksIfOwnerMatch.
This will allow the secure_htaccess option to be set to "no" (old httpd config setup), but still solve the linking issue with regards to security.
Once testing is under the belt for this patch, we'll set secure_htaccess=no as the default, and harden-symlinks-patch=yes as the default.
John
[Tue Jan 10 09:34:39 2012] [notice] child pid 77443 exit signal Segmentation fault (11)
[Tue Jan 10 09:34:39 2012] [notice] child pid 77364 exit signal Segmentation fault (11)
[Tue Jan 10 09:34:39 2012] [notice] child pid 77352 exit signal Segmentation fault (11)
So I think it's not your APC but indeed the patch which is causing this. However, I only had this once until now.[Tue Jan 10 00:39:13 2012] [notice] mod_ruid2/0.9.4 enabled
[Tue Jan 10 00:39:13 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 configured -- re$
[Tue Jan 10 00:40:36 2012] [notice] child pid 11019 exit signal Bus error (7)
[Tue Jan 10 00:40:41 2012] [notice] child pid 11021 exit signal Segmentation fault (11)
[Tue Jan 10 00:40:44 2012] [notice] child pid 11017 exit signal Segmentation fault (11)
[Tue Jan 10 00:40:45 2012] [notice] child pid 11018 exit signal Segmentation fault (11)
[Tue Jan 10 00:40:45 2012] [notice] child pid 11020 exit signal Segmentation fault (11)
[Tue Jan 10 00:40:45 2012] [notice] child pid 11031 exit signal Segmentation fault (11)
[Tue Jan 10 00:40:45 2012] [notice] child pid 11034 exit signal Segmentation fault (11)
[Tue Jan 10 00:40:46 2012] [notice] child pid 15859 exit signal Illegal instruction (4)
[Tue Jan 10 00:40:46 2012] [notice] child pid 17250 exit signal Illegal instruction (4)
[Tue Jan 10 00:40:46 2012] [notice] caught SIGTERM, shutting down
[Tue Jan 10 00:40:46 2012] [notice] seg fault or similar nasty error detected in the parent process
Starting httpd: Syntax error on line 26 of
/usr/local/directadmin/data/users/...
[root@server custombuild]# ./build rewrite_confs
Using 12.12.12.12 for your server IP
Writing data to /etc/httpd/conf/extra/httpd-suphp.conf
Done.
Restarting apache.
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 26 of
/usr/local/directadmin/data/users/adv
Unknown DAV provider: svn
[root@server custombuild]#