Skip to contentSkip to conversation

IBAC Patch

PATCH In review Mimi Zohar 3 participants 4 messages Mar 23, 2007 – Mar 27, 2007 Security (LSM)

lore
Share & tools
lore

Mimi Zohar

author
#0 lore raw

PATCH 7/7 IBAC Patch

This is a new Integrity Based Access Control(IBAC) LSM module which bases access control decisions on the new integrity framework services. IBAC is a sample LSM module to help clarify the interaction between LSM and Linux Integrity Modules(LIM).

- Updated Kconfig SECURITY_IBAC description and SECURITY_IBAC_BOOTPARAM default value
- Prefixed all log messages with "ibac:"
- Redefined a couple of 'int' variables as 'static int'

---

security/ibac/Kconfig new file +41 -0
Index: linux-2.6.21-rc4-mm1/security/ibac/Kconfig
===================================================================
@@ -0,0 +1,41 @@
+config SECURITY_IBAC
+	boolean "IBAC support"
+	depends on SECURITY && SECURITY_NETWORK && INTEGRITY
+	help
+	  Integrity Based Access Control(IBAC) uses the Linux
+	  Integrity Module(LIM) API calls to verify an executable's
+	  metadata and data's integrity.  Based on the results,
+	  execution permission is permitted/denied.  Integrity
+	  providers may implement the LIM hooks differently.  For
+	  more information on integrity verification refer to the
+	  specific integrity provider documentation.
+
+config SECURITY_IBAC_BOOTPARAM
+	bool "IBAC boot parameter"
+	depends on SECURITY_IBAC
+	default n
+	help
+	  This option adds a kernel parameter 'ibac', which allows IBAC
+	  to be disabled at boot.  If this option is selected, IBAC
+	  functionality can be disabled with ibac=0 on the kernel
+	  command line.  The purpose of this option is to allow a
+	  single kernel image to be distributed with IBAC built in,
+	  but not necessarily enabled.
+
+	  If you are unsure how to answer this question, answer N.
+
+config SECURITY_IBAC_BOOTPARAM_VALUE
+	int "IBAC boot parameter default value"
+	depends on SECURITY_IBAC_BOOTPARAM
+	range 0 1
+	default 0
+	help
+	  This option sets the default value for the kernel parameter
+	  'ibac', which allows IBAC to be disabled at boot.  If this
+	  option is set to 0 (zero), the IBAC kernel parameter will
+	  default to 0, disabling IBAC at bootup.  If this option is
+	  set to 1 (one), the IBAC kernel parameter will default to 1,
+	  enabling IBAC at bootup.
+
+	  If you are unsure how to answer this question, answer 0.
+
security/ibac/Makefile new file +6 -0
Index: linux-2.6.21-rc4-mm1/security/ibac/Makefile
===================================================================
@@ -0,0 +1,6 @@
+#
+# Makefile for building IBAC
+#
+
+obj-$(CONFIG_SECURITY_IBAC) += ibac.o
+ibac-y 	:= ibac_main.o
security/ibac/ibac_main.c new file +123 -0

123 lines not on this page · raw message

security/Kconfig +1 -0
Index: linux-2.6.21-rc4-mm1/security/Kconfig
===================================================================
@@ -125,5 +125,6 @@ config SECURITY_ROOTPLUG
 source security/selinux/Kconfig
 
 source security/slim/Kconfig
+source security/ibac/Kconfig
 endmenu
 
security/Makefile +1 -0
Index: linux-2.6.21-rc4-mm1/security/Makefile
===================================================================
@@ -14,6 +14,7 @@ endif
 obj-$(CONFIG_SECURITY)			+= security.o dummy.o inode.o
 obj-$(CONFIG_INTEGRITY)		+= integrity.o integrity_dummy.o
 obj-$(CONFIG_INTEGRITY_EVM)		+= evm/
+obj-$(CONFIG_SECURITY_IBAC)		+= ibac/
 # Must precede capability.o in order to stack properly.
 obj-$(CONFIG_SECURITY_SLIM)		+= slim/
 obj-$(CONFIG_SECURITY_SELINUX)		+= selinux/built-in.o
#1 lore raw

Hi!

Quoted 18 lines

This is a new Integrity Based Access Control(IBAC) LSM module which bases access control decisions on the new integrity framework services. IBAC is a sample LSM module to help clarify the interaction between LSM and Linux Integrity Modules(LIM).

- Updated Kconfig SECURITY_IBAC description and SECURITY_IBAC_BOOTPARAM default value
- Prefixed all log messages with "ibac:"
- Redefined a couple of 'int' variables as 'static int'

---
Index: linux-2.6.21-rc4-mm1/security/ibac/Kconfig
===================================================================

security/ibac/Kconfig new file +1 -0
@@ -0,0 +1,41 @@
+config SECURITY_IBAC

security/ibac/Kconfig line 11

Quoted 10 lines
security/ibac/Kconfig new file +10 -0
+	boolean "IBAC support"
+	depends on SECURITY && SECURITY_NETWORK && INTEGRITY
+	help
+	  Integrity Based Access Control(IBAC) uses the Linux
+	  Integrity Module(LIM) API calls to verify an executable's
+	  metadata and data's integrity.  Based on the results,
+	  execution permission is permitted/denied.  Integrity
+	  providers may implement the LIM hooks differently.  For
+	  more information on integrity verification refer to the
+	  specific integrity provider documentation.

...sounds like pseudosecurity piece of **** whose only purpose is to prevent computer's owner to hack his own system?

Why do we want it?
Pavel

security/ibac/Kconfig line 12

Quoted 1 line
security/ibac/Kconfig new file +1 -0
+ * Integrity Based Access Control(IBAC) sample LSM module calling LIM hooks

sample?

security/ibac/Kconfig line 16

Quoted 4 lines
security/ibac/Kconfig new file +4 -0
+static inline int is_kernel_thread(struct task_struct *tsk)
+{
+	return (!tsk->mm) ? 1 : 0;
+}

Obfuscated C code contest?

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
maintainer
#2 lore raw
Quoted 34 lines · Pavel Machek

Hi!

Quoted 18 lines

This is a new Integrity Based Access Control(IBAC) LSM module which bases access control decisions on the new integrity framework services. IBAC is a sample LSM module to help clarify the interaction between LSM and Linux Integrity Modules(LIM).

- Updated Kconfig SECURITY_IBAC description and SECURITY_IBAC_BOOTPARAM default value
- Prefixed all log messages with "ibac:"
- Redefined a couple of 'int' variables as 'static int'

---
Index: linux-2.6.21-rc4-mm1/security/ibac/Kconfig
===================================================================

security/ibac/Kconfig new file +1 -0
@@ -0,0 +1,41 @@
+config SECURITY_IBAC

security/ibac/Kconfig line 11

Quoted 10 lines
security/ibac/Kconfig new file +10 -0
+	boolean "IBAC support"
+	depends on SECURITY && SECURITY_NETWORK && INTEGRITY
+	help
+	  Integrity Based Access Control(IBAC) uses the Linux
+	  Integrity Module(LIM) API calls to verify an executable's
+	  metadata and data's integrity.  Based on the results,
+	  execution permission is permitted/denied.  Integrity
+	  providers may implement the LIM hooks differently.  For
+	  more information on integrity verification refer to the
+	  specific integrity provider documentation.

...sounds like pseudosecurity piece of **** whose only purpose is to prevent computer's owner to hack his own system?

Quoted 1 line

Why do we want it?

I assume, as it says not too far above, we want it as

"a sample LSM module to help clarify the interaction between LSM and Linux Integrity Modules(LIM)"

Since the LIM stuff is infrastructure code, a simple user is nice of her to provide, like the root_plug LSM.

Perhaps the comments should warn that using this for real by itself would be trivial to work around?

-serge

#3 lore raw

Hi!

Quoted 36 lines
Quoted 32 lines
Quoted 18 lines

This is a new Integrity Based Access Control(IBAC) LSM module which bases access control decisions on the new integrity framework services. IBAC is a sample LSM module to help clarify the interaction between LSM and Linux Integrity Modules(LIM).

- Updated Kconfig SECURITY_IBAC description and SECURITY_IBAC_BOOTPARAM default value
- Prefixed all log messages with "ibac:"
- Redefined a couple of 'int' variables as 'static int'

---
Index: linux-2.6.21-rc4-mm1/security/ibac/Kconfig
===================================================================

security/ibac/Kconfig new file +1 -0
@@ -0,0 +1,41 @@
+config SECURITY_IBAC

security/ibac/Kconfig line 11

Quoted 10 lines
security/ibac/Kconfig new file +10 -0
+	boolean "IBAC support"
+	depends on SECURITY && SECURITY_NETWORK && INTEGRITY
+	help
+	  Integrity Based Access Control(IBAC) uses the Linux
+	  Integrity Module(LIM) API calls to verify an executable's
+	  metadata and data's integrity.  Based on the results,
+	  execution permission is permitted/denied.  Integrity
+	  providers may implement the LIM hooks differently.  For
+	  more information on integrity verification refer to the
+	  specific integrity provider documentation.

...sounds like pseudosecurity piece of **** whose only purpose is to prevent computer's owner to hack his own system?

Quoted 1 line

Why do we want it?

I assume, as it says not too far above, we want it as

Quoted 8 lines

"a sample LSM module to help clarify the interaction between LSM and Linux Integrity Modules(LIM)"

Since the LIM stuff is infrastructure code, a simple user is nice of her to provide, like the root_plug LSM.

Perhaps the comments should warn that using this for real by itself would be trivial to work around?

Certainly. And I'm not sure if we are not carying enough example code already :-).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html