Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118188 - Request: hardened-sources-2.6.14-r5 (grsec-2.1.8)
Summary: Request: hardened-sources-2.6.14-r5 (grsec-2.1.8)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: John Mylchreest (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
: 118991 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-07 08:28 UTC by kfm
Modified: 2006-02-01 20:18 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
hardened-sources-2.6.14-r4.ebuild (pre) (hardened-sources-2.6.14-r4.ebuild,583 bytes, text/plain)
2006-01-07 08:29 UTC, kfm
Details
hardened-sources-2.6.14-r5.ebuild (hardened-sources-2.6.14-r5.ebuild,583 bytes, text/plain)
2006-01-08 21:05 UTC, kfm
Details
files/digest-hardened-sources-2.6.14-r5 (digest-hardened-sources-2.6.14-r5,228 bytes, text/plain)
2006-01-18 00:35 UTC, kfm
Details
hardened-sources-2.6.14-r5.ebuild (stable release) (hardened-sources-2.6.14-r5.ebuild,577 bytes, text/plain)
2006-01-27 07:27 UTC, kfm
Details
files/digest-hardened-sources-2.6.14-r5 (updated) (digest-hardened-sources-2.6.14-r5,229 bytes, text/plain)
2006-01-27 07:28 UTC, kfm
Details
files/digest-hardened-sources-2.6.14-r5 (30-01-2006) (digest-hardened-sources-2.6.14-r5,229 bytes, text/plain)
2006-01-30 14:49 UTC, kfm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2006-01-07 08:28:43 UTC
Hi, I'm filing this bug in anticipation of a forthcoming grsecurity-2.1.8 release which could necessitate a hardened-sources revision bump. At present, a grsecurity-2.1.8-2.6.14.5-200601052238 patch is available for *testing* purposes. 

I'm attaching an ebuild here to facilitate such testing for any interested parties. It relies upon a "hardened-patches-2.6.14-4.extras.tar.bz" tarball which I've uploaded to http://www.recruit2recruit.net/kerframil/patches/ (md5sum: fcbbac541bbd64efb7ad9e0a295b0306). The only change is that #4905 in the set has been updated accordingly (with the usual removal of the hunk that affects the kernel's Makefile).
Comment 1 kfm 2006-01-07 08:29:53 UTC
Created attachment 76452 [details]
hardened-sources-2.6.14-r4.ebuild (pre)
Comment 2 kfm 2006-01-08 21:03:35 UTC
Latest snapshot available is now "grsecurity-2.1.8-2.6.14.6-200601081947" which, as the name suggests, was synced with the new 2.6.14.6 release. I've updated the tarballs in my webspace. I'll attach a new ebuild which also relies upon "genpatches-2.6.14-9.base.tar.bz2". See bug 118351 for more information.
Comment 3 kfm 2006-01-08 21:05:51 UTC
Created attachment 76587 [details]
hardened-sources-2.6.14-r5.ebuild
Comment 4 kfm 2006-01-08 21:08:31 UTC
Please also note that in order to correctly use and admister the RBAC mechanism provided in the 2.1.8 grsecurity patch one should be sure to use the latest version of gradm; the sources are available here: http://www.grsecurity.net/~spender/gradm-2.1.8-200601081938.tar.gz
Comment 5 kfm 2006-01-09 10:27:45 UTC
Oops, I made a mistake when preparing the hardened-extras tarball which would result in compile failures. I've now uploaded a fixed instance (md5: d5f7e4659f91690a7779219ce5b43e3b).
Comment 6 kfm 2006-01-12 21:22:48 UTC
Renamed the test ebuild to -r5 because an -r4 has been committed to portage recently. Furthemore, a "genpatches-2.6.14-9" set has been officially commited so it's again only necessary to download the "hardened-patches-2.6.14-4.extras" tarball.
Comment 7 kfm 2006-01-16 13:29:35 UTC
*** Bug 118991 has been marked as a duplicate of this bug. ***
Comment 8 kfm 2006-01-18 00:31:56 UTC
Bumped the tarball to incorporate the very latest grsec-2.1.8-2.6.14.6-200601171750 patch.
Comment 9 kfm 2006-01-18 00:35:04 UTC
Created attachment 77402 [details]
files/digest-hardened-sources-2.6.14-r5

Here's a digest for the ebuild as it currently stands.
Comment 10 kfm 2006-01-27 07:25:03 UTC
Now including the grsecurity-2.1.8-2.6.14.6-200601211647 patch which has reached release status upstream. Therefore I'm requesting that this now be added to the tree. Note that both "sys-apps/gradm-2.1.8.200601212342" and "hardened-sources-2.4.32-r2" are in the tree now for grsec-2.1.8 support (albeit in ~testing). All pre-requisite ebuilds/tarballs and the split-out patches can currently be found in my webspace. Will attach new ebuild/digest here in any case.
Comment 11 kfm 2006-01-27 07:27:57 UTC
Created attachment 78285 [details]
hardened-sources-2.6.14-r5.ebuild (stable release)
Comment 12 kfm 2006-01-27 07:28:25 UTC
Created attachment 78286 [details]
files/digest-hardened-sources-2.6.14-r5 (updated)
Comment 13 kfm 2006-01-27 07:33:26 UTC
Note also that the current ebuild relies on a maintenance genpatches release which is not in the tree. If committed this will add the following patches:

1006_Q_01_irq-affinity-broken-with-msi.patch
1006_Q_02_bridge-netfilter-ip-fragments.patch
1006_Q_03_sparc64-ptrace.patch
1006_Q_04_sparc64-fstat64.patch
1006_Q_05_netfilter-pptp-crash-1.patch
1006_Q_06_netfilter-pptp-crash-2.patch
1090_15.1_01_ppc-ml300-ep405-boot.patch
1090_15.1_02_vgacon-doublescan.patch
1090_15.1_03_netlink-oops-fix.patch
1090_15.1_04_moxa-capability-check.patch
1090_15.1_05_sparc64-64k-hugetlb-depends.patch
1091_15.Q_01_kill-blk_attempt_remerge.patch
1091_15.Q_02_input-hid-oops-fix.patch
1091_15.Q_03_sys_mq_open-double-decrement.patch (bug 119087)
1091_15.Q_04_ufs-mount-oops-fix.patch
1091_15.Q_05_sparc64-timekeeping-fix.patch
1091_15.Q_06_skb_reserve-signed-len.patch
1091_15.Q_07_pci-gart-mask-gpf-flags.patch
1115_sys_mq_open-double-decrement.patch
1115_dm-crypt-zero-key-material.patch (bug 119562)
1120_dvb-dst-buffer-overflow-fix.patch (bug 119561)
4000_intel-ich8.patch (in -extras)

I have personally tested this on two x86 systems and one amd64 system.
Comment 14 kfm 2006-01-27 07:34:11 UTC
Oops, the "1115_sys_mq_open-double-decrement.patch" line in the previous comment is erroneous ;)
Comment 15 kfm 2006-01-28 12:21:56 UTC
Note: all of my work is hosted here now: http://brianw.org/kerframil/kernel/ and http://brianw.org/kerframil/ebuilds/.
Comment 16 kfm 2006-01-30 14:48:15 UTC
The stable queues have reached review stage upstream. Added two remaining 2.6.15 queue fixes and added/backported properly a patch that I had previous glossed over from 2.6.15.1 (which is 1090_15.1_03). Thanks to plasmaroo for helping out on that one. Tested to the same extent as before and working well. Last modification I reckon :)

+ 1090_15.1_03_workqueue-oops-during-cpu-offline.patch
R 1090_15.1_04_netlink-oops-fix.patch
R 1090_15.1_05_moxa-capability-check.patch
R 1090_15.1_06_sparc64-64k-hugetlb-depends.patch
+ 1091_15.Q_08_reiserfs-mount-options-fix.patch
+ 1091_15.Q_09_i2o-scsi-abort-oops.patch
Comment 17 kfm 2006-01-30 14:49:59 UTC
Created attachment 78529 [details]
files/digest-hardened-sources-2.6.14-r5 (30-01-2006)
Comment 18 Alex Efros 2006-02-01 18:50:43 UTC
I've just upgraded from -r3 to -r5. There one new option was added in -r5: GRKERNSEC_MODSTOP. I've enabled it and found small bug: disabling module (un)loading also automatically disable changing other grsec options.

I've these two lines at bottom of /etc/sysctl.conf:
kernel.grsecurity.disable_modules = 1
kernel.grsecurity.grsec_lock = 1
and after executing first line sysctl unable to execute second line.

Here is what I see in console:
home /proc/sys/kernel/grsecurity # cat disable_modules 
1
home /proc/sys/kernel/grsecurity # cat grsec_lock 
0
home /proc/sys/kernel/grsecurity # echo 0 > disable_modules 
home /proc/sys/kernel/grsecurity # cat disable_modules 
1
home /proc/sys/kernel/grsecurity # echo 1 > grsec_lock 
home /proc/sys/kernel/grsecurity # cat grsec_lock 
0

And here is what was added into log file while I run these commands:
2006-02-02_02:49:04.79450 kern.alert: grsec: denied modification of grsecurity sysctl value : disable_modules by /bin/bash[bash:29081] uid/euid:0/0 gid/egid:0/0, parent /bin/su[su:13200] uid/euid:0/0 gid/egid:0/0
2006-02-02_02:49:16.37100 kern.alert: grsec: denied modification of grsecurity sysctl value : grsec_lock by /bin/bash[bash:29081] uid/euid:0/0 gid/egid:0/0, parent /bin/su[su:13200] uid/euid:0/0 gid/egid:0/0
Comment 19 solar (RETIRED) gentoo-dev 2006-02-01 20:08:48 UTC
(In reply to comment #18)
This seems reproduceable here with hardened-sources-2.4.32-r2 also. 
Mail sent to spender@grsec about this.
Comment 20 kfm 2006-02-01 20:18:54 UTC
I've moved the information in the previous 2 comments over to a new bug (bug 121250) where it belongs. Closing this one as hardened-sources-2.6.14-r5 has been committed.