UidBind LSM 0.1
Hi all,
this is a very simple module that allows bind() to tcp/udp port (>=1024) only for the uids defined in a configfs tree.
It is a first version, it only works for PF_INET sockets and makes no difference between tcp and udp (i am working on this)
For (little) more info see
http://projects.unbit.it/uidbind/
Patch attached is for vanilla 2.6.20.7
Signature · 4 lines
Roberto De Ioris http://unbit.it JID: [email protected] Wii: 2999 4476 3509 0964
security/Kconfig +12 -0
@@ -93,6 +93,18 @@ If you are unsure how to answer this question, answer N. +config SECURITY_UIDBIND + tristate "UidBind" + depends on CONFIGFS_FS && SECURITY && SECURITY_NETWORK + help + This simple module allows call to bind() function only for + uid defined in a configfs tree. + The only supported socket is PF_INET. + + See <http://projects.unbit.it/uidbind> for more information about + this module + + source security/selinux/Kconfig endmenu
security/Makefile +1 -0
@@ -16,3 +16,4 @@ obj-$(CONFIG_SECURITY_SELINUX) += selinux/built-in.o obj-$(CONFIG_SECURITY_CAPABILITIES) += commoncap.o capability.o obj-$(CONFIG_SECURITY_ROOTPLUG) += commoncap.o root_plug.o +obj-$(CONFIG_SECURITY_UIDBIND) += commoncap.o uidbind.o
security/uidbind.c +263 -0
263 lines not on this page · raw message
Quoted 4 lines · Roberto De Ioris
Hi all,
this is a very simple module that allowsbind()to tcp/udp port (>=1024) only for the uids defined in a configfs tree.
Quoted 8 lines
It is a first version, it only works for
PF_INETsockets and makes no difference between tcp and udp (i am working on this)For (little) more info see
http://projects.unbit.it/uidbind/
Patch attached is for vanilla 2.6.20.7
Is it possible to lock a range of ports to a uid?
Also, is it possible to lock a uid to one ip address? For example usera can only bind to 10.0.0.23 while userb can only bind to 10.0.0.24.
Gerhard
--
Gerhard Mack
<>< As a computer I find your faith in technology amusing.
Il giorno lun, 23/04/2007 alle 14.38 -0400, Gerhard Mack ha scritto:
Quoted 8 lines · Roberto De Ioris
Quoted 7 lines
Hi all,
this is a very simple module that allowsbind()to tcp/udp port (>=1024) only for the uids defined in a configfs tree.It is a first version, it only works for
PF_INETsockets and makes no difference between tcp and udp (i am working on this)
Quoted 7 lines
Quoted 5 lines
For (little) more info see
http://projects.unbit.it/uidbind/
Patch attached is for vanilla 2.6.20.7
Is it possible to lock a range of ports to a uid?
I think i can implement something like a configfs item named '8081-8090', instead of only '8081'.
I will need to validate the range, but its not too difficult.
Quoted 3 lines
Also, is it possible to lock a uid to one ip address? For example usera can only bind to 10.0.0.23 while userb can only bind to 10.0.0.24.
This is simple to add and i have already a patch for it. In the next few days i will post it.
Signature · 4 lines
Roberto De Ioris http://unbit.it JID: [email protected] Wii: 2999 4476 3509 0964
Quoted 3 lines · --- Roberto De Ioris
Hi all,
this is a very simple module that allowsbind()to tcp/udp port (>=1024) only for the uids defined in a configfs tree.
Would you be so kind as to cross post to linux-security-module? Methinks that you might get additional valuable feedback there.
Quoted 8 lines
It is a first version, it only works for
PF_INETsockets and makes no difference between tcp and udp (i am working on this)For (little) more info see
http://projects.unbit.it/uidbind/
Patch attached is for vanilla 2.6.20.7
It would be correct to return -EACCES rather than -EPERM in the access denial case. EACCES indicates that an access control decision failed, while EPERM indicates that use of a privileged operation was attempted while not possessing appropriate privilege.
Casey Schaufler
[email protected]
Il giorno mar, 24/04/2007 alle 06.51 -0700, Casey Schaufler ha scritto:
Quoted 8 lines
Quoted 3 lines · --- Roberto De Ioris
Hi all,
this is a very simple module that allowsbind()to tcp/udp port (>=1024) only for the uids defined in a configfs tree.Would you be so kind as to cross post to linux-security-module? Methinks that you might get additional valuable feedback there.
Surely, in the next hour i will release a new version with tcp/udp support and the possibility to specify ipv4 addresses. I will post in linux-security-module too
Quoted 6 lines
Quoted 6 lines
It is a first version, it only works for
PF_INETsockets and makes no difference between tcp and udp (i am working on this)For (little) more info see
Quoted 8 lines
Quoted 3 lines
http://projects.unbit.it/uidbind/
Patch attached is for vanilla 2.6.20.7
It would be correct to return
-EACCESrather than-EPERMin the access denial case. EACCES indicates that an access control decision failed, while EPERM indicates that use of a privileged operation was attempted while not possessing appropriate privilege.
Done, thanks :)
Signature · 4 lines
Roberto De Ioris http://unbit.it JID: [email protected] Wii: 2999 4476 3509 0964