Editing
GrsecurityHowto
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= [[?action=find&find=grsecurityHowto|grsecurityHowto]] = <div id="toolbar-top"> [[Linux-VServer]] | [[RecentChanges]] | [http://linux-vserver.org/?action=prefs Preferences] | [http://tavi.sourceforge.net/FormattingRules FormattingRules] </div> ----- </div> <div id="body"> Patches are at [http://www.firehead.org/~jeffrey/linux-vserver/ [grepmaster linux-vserver patch repository]]. Procedure 1 (for the more paranoid) * grab vs1.Z-diff-for-grsecurity-1.9.X-2.4.Y.patch * inspect it to verify that I haven't added in nefarious things to the grsecurity patch * grab grsecurity-1.9.X-2.4.Y.patch from [http://www.grsecurity.net/download.php [www.grsecurity.net/download.php]] * cat /path/to/vs1.Z-diff-for-grsecurity-1.9.X-2.4.Y.patch | patch -p0 * apply resultant patch to your linux+vserver kernel tree Procedure 2 (for the less paranoid) * grab grsecurity-1.9.X-2.4.Y-vs1.Z.patch * apply it to your linux+vserver kernel tree As far as the grsecurity additional chroot restrictions go, I have the following turned off and all the rest turned on: * deny double-chroots * deny (f)chmod +s * capability restrictions within chroot The first is necessary for gentoo emerge as well as running daemons within chroot (djbdns, or whatever). The second is necessary for upgrading packages with suid files in them (common task). The third does not seem necessary for Debian but breaks Gentoo emerge when turned on. There's currently an issue on using GR Security 1.9.x ACLs since once the ACL is applied the CAP_SYS_ADMIN is dropped and it can not be recovered for editing or disabling the ACL. <code># gradm -E </code> <code># gradm -a </code> <code>Password: </code> <code>Could not open /proc/sys/kernel/grsecurity/acl </code> <code>open: Permission denied </code> Kernel log shows this: <code>Mar 30 09:31:47 alus2 kernel: grsec: From 192.168.1.2: use of CAP_SYS_ADMIN denied for (gradm:1374) UID(0) EUID(0), parent (bash:706) UID(0) EUID(0)</code> (why it's denied? It never happens in grsec+gradm only) The consecuence is that the first ACL can not be undone, it's permanent. Deep testing is recomended before using ACLs on production servers with GR Security + vserver patches. [Thank you for explainig this issue - Maybe this is only an issue with grsecurity 1.9.x, because I use grsecurity 2.0/vserver 1.3.9 and after enabling the ACLs with "gradm -E" I can still get the admin role with "gradm -a admin" and then reload new ACLs with "gradm -R" - tested in context 0.] send requests / compliments / flames to jeffrey+vserver AT firehead DOT org </div> <div id="footer"> <div class="copyleft"> <br /> Permission is granted to copy, distribute and/or modify this document under the terms of the<br /> [http://www.fsf.org/licenses/fdl.txt GNU Free Documentation License], Version 1.2 or any later version published by the Free Software Foundation. </div> ----- <div id="toolbar-bottom"> [[grsecurityHowto?action=edit|Edit this document]] | [[grsecurityHowto?action=history|View document history]]<br /> </div> Document last modified Sat, 12 Jun 2004 00:45:48<br /> <div class="form"> <br /> Search: </div> </div>
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information