Skip to contentSkip to conversation

policy support for SSP

PATCH Petre Rodan 2 participants 2 messages Mar 12, 2006 – Mar 14, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi,

the Hardened Gentoo [1] and FC5? [2] projects use stack smash protection [3] in their systems. this means that every binary compiled with a hardened toolchain will need access to /dev/urandom.

here is a small patch that has a tunable for allowing any domain access to urandom_device_t.
since now this was a gentoo-only tunable, but since others might need it, a distro_gentoo should not be wrapped around it.

[1] http://www.gentoo.org/proj/en/hardened/pax-quickstart.xml
[2] http://fedora.redhat.com/docs/release-notes/fc5/test2-latest-en/sn-package-notes.html
[3] http://www.trl.ibm.com/projects/security/ssp/

bye,
peter

Signature · 4 lines
petre rodan
<[email protected]>
Developer,
Hardened Gentoo Linux 

Index: policy/global_tunables
===================================================================
RCS file: /cvsroot/serefpolicy/refpolicy/policy/global_tunables,v retrieving revision 1.31

global_tunables +8 -0
diff -u -B -r1.31 global_tunables
@@ -51,6 +51,14 @@
 
 ## <desc>
 ## <p>
+## Allow binaries compiled with stack-smashing protection
+## to read from urandom
+## </p>
+## </desc>
+gen_tunable(allow_ssp,false)
+
+## <desc>
+## <p>
 ## Allow ftp servers to modify public files
 ## used for public file transfer services.
 ## </p>

Index: policy/modules/kernel/devices.te
===================================================================
RCS file: /cvsroot/serefpolicy/refpolicy/policy/modules/kernel/devices.te,v retrieving revision 1.17

modules/kernel/devices.te +6 -0
diff -u -B -r1.17 devices.te
@@ -150,6 +150,12 @@
 type urandom_device_t;
 dev_node(urandom_device_t)
 
+# if all binaries are compiled with stack-smashing protection
+# then all domains need to read from /dev/urandom
+tunable_policy(`allow_ssp',`
+	dev_read_urand(domain)
+')
+
 #
 # usbfs_t is the type for the /proc/bus/usb pseudofs
 #
#1 lore raw
Quoted 5 lines · Petre Rodan

the Hardened Gentoo [1] and FC5? [2] projects use stack smash protection [3] in their systems. this means that every binary compiled with a hardened toolchain will need access to /dev/urandom.

here is a small patch that has a tunable for allowing any domain access to urandom_device_t.
since now this was a gentoo-only tunable, but since others might need it, a distro_gentoo should not be wrapped around it.

Merged. I moved the rule to the domain module. I also changed the tunable name to global_ssp, to make it more clear that it is applied to all domains.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.