Where is the AVC?
Quoted 1 line
From reading the book "SELinux by example", it seems that the AVC is managed
by the Security Server (figure 3-2). Instead, by reading the paper "The Flask Security Architecture: System support for Diverse Security Policies" in the NSA website, it looks like the AVC is managed by the Object Managers (why the plural? I though that there was just one object manager, but maybe it's because I was thinking only about files...So, there's an object manager for every macro-class of objects (files, processes, network objects?)?). Who is wrong and who is right?
Another thing: the security context of files, in ext2/ext3/jfs/xfs filesystems is memorized in the xattr space of inodes, in the attribute security.selinux. But, is it memorized in the string form (user:role:type), or in the PSID form (the 32-integer which is mapped by the Security Server into a "true" security context)? Doing "getfattr -n security.selinux file" on a file gives me the string rapresentation of the Security Context, but also on objects like /dev/men... Thanks in advance
_________________________________________________________________
Blocca le pop-up pubblicitarie con MSN Toolbar! http://toolbar.msn.it/
--
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.
Quoted 8 lines · Salvo Giuffrida
Quoted 1 line
From reading the book "SELinux by example", it seems that the AVC is managed
by the Security Server (figure 3-2). Instead, by reading the paper "The Flask Security Architecture: System support for Diverse Security Policies" in the NSA website, it looks like the AVC is managed by the Object Managers (why the plural? I though that there was just one object manager, but maybe it's because I was thinking only about files...So, there's an object manager for every macro-class of objects (files, processes, network objects?)?). Who is wrong and who is right?
An object manager gets access decisions from its AVC, which consults the security server when the decision isn't already cached. Meanwhile, if a policy change occurs, the security server needs to notify the AVCs of all object managers of the change so that their state can be updated (in simplest form, by flushing the caches). There can be any number of object managers. In Linux, the entire kernel is really a single object manager, but in earlier microkernel-based systems, there were separate object managers for process management, filesystems, and networking. Further, even in Linux, there are userspace object managers that need to enforce policy over their own objects and operations, like D-BUS, X, Postgres, etc. The architecture itself is general and widely applicable. I doubt there is any real contradiction between the book and the paper, but the paper is obviously the more authoritative description of the architecture. When in doubt, I'm always right ;)
Quoted 7 lines
Another thing: the security context of files, in ext2/ext3/jfs/xfs filesystems is memorized in the xattr space of inodes, in the attribute security.selinux. But, is it memorized in the string form (user:role:type), or in the PSID form (the 32-integer which is mapped by the Security Server into a "true" security context)? Doing "getfattr -n security.selinux file" on a file gives me the string rapresentation of the Security Context, but also on objects like
/dev/men...
String form. To clarify:
1) PSIDs or persistent SIDs were an artifact of the original SELinux implementation before we migrated to using extended attributes (which were not yet in the mainline kernel at the time we first developed SELinux). They do not exist at all in the current SELinux. They were integers that indexed to security contexts in a mapping database in each filesystem, with the integers then stored in a field of the on-disk inode. The security server had no awareness of them.
2) SIDs are non-persistent, local handles (integers) that refer to security contexts and are mapped by the security server. They still exist, but the kernel SIDs are now private to the kernel and not exported to userspace, unlike the original SELinux. Userspace programs can create their own userspace SID mappings via the libselinux AVC, which is used by e.g. D-BUS and XSELinux.
Signature · 8 lines
Stephen Smalley National Security Agency -- 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.
Quoted 9 lines
From: Stephen Smalley <[email protected]>
To: Salvo Giuffrida <[email protected]>
CC: [email protected]
Subject: Re: Where is the AVC?
Date: Fri, 29 Sep 2006 13:20:52 -0400
Quoted 14 lines
An object manager gets access decisions from its AVC, which consults the security server when the decision isn't already cached. Meanwhile, if a policy change occurs, the security server needs to notify the AVCs of all object managers of the change so that their state can be updated (in simplest form, by flushing the caches). There can be any number of object managers. In Linux, the entire kernel is really a single object manager, but in earlier microkernel-based systems, there were separate object managers for process management, filesystems, and networking. Further, even in Linux, there are userspace object managers that need to enforce policy over their own objects and operations, like D-BUS, X, Postgres, etc. The architecture itself is general and widely applicable. I doubt there is any real contradiction between the book and the paper, but the paper is obviously the more authoritative description of the architecture. When in doubt, I'm always right ;)
If you look at figure 3-2 (if you want, I can send to you), the AVC is designed in kernel-space, whereas the object manager is in userspace. So, if the AVC is managed by the object manager, shouldn't it be in userspace?
I even still have some doubt on the real function of Object Managers: after they contact the AVC/S.S., they serve just for implementing "in concrete, low level actions" the decisions of the AVC/S.S.? Like, writing the security context in the xattr of a file/dir, or blocking IPC between processes? If so, looks like it is standard Linux kernel component (nothing new, something that already existed with a new name. The only different thing is the use of the policy interface with the AVC). Am I wrong?
Quoted 7 lines
String form. To clarify:
2) SIDs are non-persistent, local handles (integers) that refer to security contexts and are mapped by the security server. They still exist, but the kernel SIDs are now private to the kernel and not exported to userspace, unlike the original SELinux. Userspace programs can create their own userspace SID mappings via the libselinux AVC, which is used by e.g. D-BUS and XSELinux.
SIDs are now used only for non-persistent objects? Thanks
_________________________________________________________________
Ricerche online più semplici e veloci con MSN Toolbar! http://toolbar.msn.it/
--
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.
Quoted 46 lines
From: "Salvo Giuffrida" <[email protected]>
To: [email protected]
CC: [email protected]
Subject: Re: Where is the AVC?
Date: Fri, 29 Sep 2006 19:34:06 +0200Quoted 6 lines
From: Stephen Smalley <[email protected]>
To: Salvo Giuffrida <[email protected]>
CC: [email protected]
Subject: Re: Where is the AVC?
Date: Fri, 29 Sep 2006 13:20:52 -0400Quoted 14 lines
An object manager gets access decisions from its AVC, which consults the security server when the decision isn't already cached. Meanwhile, if a policy change occurs, the security server needs to notify the AVCs of all object managers of the change so that their state can be updated (in simplest form, by flushing the caches). There can be any number of object managers. In Linux, the entire kernel is really a single object manager, but in earlier microkernel-based systems, there were separate object managers for process management, filesystems, and networking. Further, even in Linux, there are userspace object managers that need to enforce policy over their own objects and operations, like D-BUS, X, Postgres, etc. The architecture itself is general and widely applicable. I doubt there is any real contradiction between the book and the paper, but the paper is obviously the more authoritative description of the architecture. When in doubt, I'm always right ;)
If you look at figure 3-2 (if you want, I can send to you), the AVC is designed in kernel-space, whereas the object manager is in userspace. So, if the AVC is managed by the object manager, shouldn't it be in userspace?
I even still have some doubt on the real function of Object Managers: after they contact theAVC/S.S., they serve just for implementing "in concrete, low level actions" the decisions of theAVC/S.S.? Like, writing the security context in the xattr of a file/dir, or blocking IPC between processes? If so, looks like it is standard Linux kernel component (nothing new, something that already existed with a new name. The only different thing is the use of the policy interface with the AVC). Am I wrong?Quoted 7 lines
String form. To clarify:
2) SIDs are non-persistent, local handles (integers) that refer to security contexts and are mapped by the security server. They still exist, but the kernel SIDs are now private to the kernel and not exported to userspace, unlike the original SELinux. Userspace programs can create their own userspace SID mappings via the libselinux AVC, which is used by e.g. D-BUS and XSELinux.SIDs are now used only for non-persistent objects? Thanks
Quoted 8 lines
_________________________________________________________________
Ricerche online più semplici e veloci con MSN Toolbar! http://toolbar.msn.it/--
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.
_________________________________________________________________
Personalizza MSN Messenger con sfondi e fotografie! http://www.ilovemessenger.msn.it/
--
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.
Quoted 9 lines
From: "Salvo Giuffrida" <[email protected]>
To: [email protected]
CC: [email protected]
Subject: Re: Where is the AVC?
Date: Fri, 29 Sep 2006 19:34:06 +0200If you look at figure 3-2 (if you want, I can send to you), the AVC is designed in kernel-space, whereas the object manager is in userspace. So, if the AVC is managed by the object manager, shouldn't it be in userspace?
OK, my fault...the AVC is in kernel space, because even the object manager is in kernel space (at least on Linux). But from the figure it still looks like the AVC is part of the S.S., not of the Object Manager...However, if the paper says that the AVC is part of the Object Manager (which is the case of user-space ones - Look figure 3.3), I say so ;-). I guess it's just a confusion regarding to the images of the book...
_________________________________________________________________
Ricerche online più semplici e veloci con MSN Toolbar! http://toolbar.msn.it/
--
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.
Quoted 4 lines
If you look at figure 3-2 (if you want, I can send to you), the AVC is designed in kernel-space, whereas the object manager is in userspace. So, if the AVC is managed by the object manager, shouldn't it be in userspace?
User space Object Managers enforce data flow decisions made by the kernel. For example, dbus is a user space object manager. If a process wants to send data though dbus, the OM asks the kernel for avc decision and then carries it out by allowing/disallowing the connection. The audit message, if one results, goes back into the kernel to be serialized with all other system events before going to the audit daemon.
The other user space object manager that you will find is nscd. There will probably be a few more of these in the future. For example, one might want one in apache, samba, or ldap. Anywhere you want to enforce through policy a data flow decision.
-Steve
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
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.