All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Checking the loaded policy against a policy on disk
@ 2005-08-19 12:32 Stephen Smalley
  2005-08-19 13:33 ` Joshua Brindle
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stephen Smalley @ 2005-08-19 12:32 UTC (permalink / raw)
  To: selinux; +Cc: Daniel J Walsh, Steve G, SELinux-dev, James Morris

Hi,

For the LSPP work, it has been requested that we provide a way to
perform a consistency check between the policy in memory and the policy
on disk.  We could change the SELinux module to compute a checksum over
the binary policy image when it is loaded and to export that checksum
via a new selinuxfs node.  One complicating factor is that at
present, /sbin/init and load_policy mutate the binary policy image in
memory prior to loading it in order to customize the vendor-shipped
policy with local boolean settings and user definitions, so the
checksums would not match at present for the on-disk file and the
in-memory image unless the verification tool applies the same transforms
prior to computing the checksums.  Tresys has previously suggested
shifting to a model where we regenerate the on-disk policy file for each
change to any local setting, with the generated policy file to be loaded
into the kernel stored separately from the policy file managed by rpm to
avoid creating problems for updates, which would eliminate that problem
altogether.

Any comments on this request?  Any particular preference as to the
particular checksum algorithm?  Does the algorithm need to be
configurable?

A related idea would be to also extend the binary policy format to
include a field for an arbitrary text string label that could be set
when the policy is generated, and have the kernel save that string and
export it via another new selinuxfs node.  This would allow an
identifier string to be associated with the policy image, such as the
policy package's name and version (e.g.
selinux-policy-targeted-1.17.25-3), and extracted later by userspace to
determine which particular policy the one in memory is supposed to
match.  This wouldn't replace the need for the checksum, but would
provide additional information that might be helpful to userspace.
However, this change would require a change in binary policy format,
unlike the first change.  

Any comments on this related idea?
  
-- 
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-08-19 22:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-19 12:32 [RFC] Checking the loaded policy against a policy on disk Stephen Smalley
2005-08-19 13:33 ` Joshua Brindle
2005-08-19 14:45   ` Stephen Smalley
2005-08-19 15:13 ` James Morris
2005-08-19 18:42   ` Frank Mayer
2005-08-19 18:55     ` Stephen Smalley
2005-08-19 19:17   ` George Wilson
2005-08-19 21:59 ` Thomas Bleher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.