Skip to contentSkip to conversation

UidBind LSM 0.2

ANNOUNCE Roberto De Ioris 3 participants 5 messages Apr 24, 2007 – Apr 25, 2007 Security (LSM)

lore
Share & tools
lore
#0 lore raw

Hi all,

this is the second release for UidBind LSM:

http://projects.unbit.it/uidbind/

UidBind allows call to bind() function only to the uid defined in a configfs tree.

It is now possible to specify different uid (for the same port) on different ipv4 addresses:

mkdir uidbind/8081
mkdir uidbind/8081/192.168.1.17
mkdir uidbind/8081/192.168.1.26
echo 1017 > uidbind/8081/192.168.1.17/uid
echo 1026 > uidbind/8081/192.168.1.26/uid

This version even fix some leek in version 0.1

Patch attached is still 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
diff -Naur linux-2.6.20.7/security/Kconfig linux-2.6.20.7-uidbind/security/Kconfig
@@ -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
diff -Naur linux-2.6.20.7/security/Makefile linux-2.6.20.7-uidbind/security/Makefile
@@ -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 +467 -0

467 lines not on this page · raw message

#1 lore raw
Quoted 18 lines · Roberto De Ioris

Hi all,

this is the second release for UidBind LSM:

http://projects.unbit.it/uidbind/

UidBind allows call to bind() function only to the uid defined in a configfs tree.

It is now possible to specify different uid (for the same port) on different ipv4 addresses:

mkdir uidbind/8081
mkdir uidbind/8081/192.168.1.17
mkdir uidbind/8081/192.168.1.26
echo 1017 > uidbind/8081/192.168.1.17/uid
echo 1026 > uidbind/8081/192.168.1.26/uid

Quoted 3 lines

This version even fix some leek in version 0.1

Patch attached is still for vanilla 2.6.20.7

Is it possible to specify ranges as allowing everyone? Is it possible to allow multiple users acess to the same port? Can ports be allowed by group?

I really like the idea of this patch. It has the potential to solve a lot of my current administrative headachs.

Gerhard

--
Gerhard Mack

[email protected]

<>< As a computer I find your faith in technology amusing.

#2 lore raw
Quoted 20 lines · --- Gerhard Mack
Quoted 18 lines · Roberto De Ioris

Hi all,

this is the second release for UidBind LSM:

http://projects.unbit.it/uidbind/

UidBind allows call to bind() function only to the uid defined in a configfs tree.

It is now possible to specify different uid (for the same port) on different ipv4 addresses:

mkdir uidbind/8081
mkdir uidbind/8081/192.168.1.17
mkdir uidbind/8081/192.168.1.26
echo 1017 > uidbind/8081/192.168.1.17/uid
echo 1026 > uidbind/8081/192.168.1.26/uid

Quoted 7 lines
Quoted 3 lines

This version even fix some leek in version 0.1

Patch attached is still for vanilla 2.6.20.7

Is it possible to specify ranges as allowing everyone? Is it possible to allow multiple users acess to the same port? Can ports be allowed by group?

If you're going to go beyond the simple owner access model it probably makes sense to go all out, swipe the file system ACL code and provide the whole nine yards of users, groups, and modes. The only system that I know of that had socket ACLs was the 4.X version of Trusted Irix, and socket ACLs were dropped in 5.0 because they were unpopular.

If you're daring you could propose that low number ports be treated the same way as other ports, with the default ownership being root and the default ACL allowing only root.

Quoted 2 lines

I really like the idea of this patch. It has the potential to solve a lot of my current administrative headachs.

Putting access control on ports rather than sockets is a novel approach. It is a lot simpler underneath and more consistant with the way other object name spaces are treated.

Casey Schaufler
[email protected]

#3 lore raw
Quoted 37 lines · Casey Schaufler
Quoted 20 lines · --- Gerhard Mack
Quoted 18 lines · Roberto De Ioris

Hi all,

this is the second release for UidBind LSM:

http://projects.unbit.it/uidbind/

UidBind allows call to bind() function only to the uid defined in a configfs tree.

It is now possible to specify different uid (for the same port) on different ipv4 addresses:

mkdir uidbind/8081
mkdir uidbind/8081/192.168.1.17
mkdir uidbind/8081/192.168.1.26
echo 1017 > uidbind/8081/192.168.1.17/uid
echo 1026 > uidbind/8081/192.168.1.26/uid

Quoted 7 lines
Quoted 3 lines

This version even fix some leek in version 0.1

Patch attached is still for vanilla 2.6.20.7

Is it possible to specify ranges as allowing everyone? Is it possible to allow multiple users acess to the same port? Can ports be allowed by group?

If you're going to go beyond the simple owner access model it probably makes sense to go all out, swipe the file system ACL code and provide the whole nine yards of users, groups, and modes. The only system that I know of that had socket ACLs was the 4.X version of Trusted Irix, and socket ACLs were dropped in 5.0 because they were unpopular.

Quoted 3 lines

If you're daring you could propose that low number ports be treated the same way as other ports, with the default ownership being root and the default ACL allowing only root.

ACL may be more complicated than needed when a simple GID addition would make this right about perfect.

Quoted 6 lines
Quoted 2 lines

I really like the idea of this patch. It has the potential to solve a lot of my current administrative headachs.

Putting access control on ports rather than sockets is a novel approach. It is a lot simpler underneath and more consistant with the way other object name spaces are treated.

Indeed I'm fond of it's rather simple and very scriptable interface.

Gerhard

--
Gerhard Mack

[email protected]

<>< As a computer I find your faith in technology amusing.

#4 lore raw

Il giorno mar, 24/04/2007 alle 18.11 -0400, Gerhard Mack ha scritto:

Quoted 10 lines · Casey Schaufler
Quoted 6 lines

--- Gerhard Mack <[email protected]> wrote:

If you're daring you could propose that low number ports be treated the same way as other ports, with the default ownership being root and the default ACL allowing only root.

ACL may be more complicated than needed when a simple GID addition would make this right about perfect.

The unix way(TM) for specifying multiple uid is...ehm.. groups :) I will add the gid,tcp_gid and udp_gid configfs attributes in the next release.
The 'check order' will be:

uidbind/<port>/<ip>/<proto>_uid
uidbind/<port>/<ip>/uid
uidbind/<port>/<proto>_uid
uidbind/<port>/uid
uidbind/<port>/<ip>/<proto>_gid
uidbind/<port>/<ip>/gid
uidbind/<port>/<proto>_gid
uidbind/<port>/gid

I am investigating the possibility of port-range use, particularly the overlap checks and performance problems.

Signature · 4 lines
Roberto De Ioris
http://unbit.it
JID: [email protected]
Wii: 2999 4476 3509 0964