1. 14 11月, 2008 8 次提交
  2. 11 11月, 2008 4 次提交
    • E
      Currently SELinux jumps through some ugly hoops to not audit a capbility · 06674679
      Eric Paris 提交于
      check when determining if a process has additional powers to override
      memory limits or when trying to read/write illegal file labels.  Use
      the new noaudit call instead.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      06674679
    • E
      Add a new capable interface that will be used by systems that use audit to · 06112163
      Eric Paris 提交于
      make an A or B type decision instead of a security decision.  Currently
      this is the case at least for filesystems when deciding if a process can use
      the reserved 'root' blocks and for the case of things like the oom
      algorithm determining if processes are root processes and should be less
      likely to be killed.  These types of security system requests should not be
      audited or logged since they are not really security decisions.  It would be
      possible to solve this problem like the vm_enough_memory security check did
      by creating a new LSM interface and moving all of the policy into that
      interface but proves the needlessly bloat the LSM and provide complex
      indirection.
      
      This merely allows those decisions to be made where they belong and to not
      flood logs or printk with denials for thing that are not security decisions.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      06112163
    • E
      Any time fcaps or a setuid app under SECURE_NOROOT is used to result in a · 3fc689e9
      Eric Paris 提交于
      non-zero pE we will crate a new audit record which contains the entire set
      of known information about the executable in question, fP, fI, fE, fversion
      and includes the process's pE, pI, pP.  Before and after the bprm capability
      are applied.  This record type will only be emitted from execve syscalls.
      
      an example of making ping use fcaps instead of setuid:
      
      setcap "cat_net_raw+pe" /bin/ping
      
      type=SYSCALL msg=audit(1225742021.015:236): arch=c000003e syscall=59 success=yes exit=0 a0=1457f30 a1=14606b0 a2=1463940 a3=321b770a70 items=2 ppid=2929 pid=2963 auid=0 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts0 ses=3 comm="ping" exe="/bin/ping" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)
      type=UNKNOWN[1321] msg=audit(1225742021.015:236): fver=2 fp=0000000000002000 fi=0000000000000000 fe=1 old_pp=0000000000000000 old_pi=0000000000000000 old_pe=0000000000000000 new_pp=0000000000002000 new_pi=0000000000000000 new_pe=0000000000002000
      type=EXECVE msg=audit(1225742021.015:236): argc=2 a0="ping" a1="127.0.0.1"
      type=CWD msg=audit(1225742021.015:236):  cwd="/home/test"
      type=PATH msg=audit(1225742021.015:236): item=0 name="/bin/ping" inode=49256 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ping_exec_t:s0 cap_fp=0000000000002000 cap_fe=1 cap_fver=2
      type=PATH msg=audit(1225742021.015:236): item=1 name=(null) inode=507915 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      3fc689e9
    • E
      This patch add a generic cpu endian caps structure and externally available · c0b00441
      Eric Paris 提交于
      functions which retrieve fcaps information from disk.  This information is
      necessary so fcaps information can be collected and recorded by the audit
      system.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      c0b00441
  3. 09 11月, 2008 1 次提交
  4. 06 11月, 2008 2 次提交
    • S
      file capabilities: add no_file_caps switch (v4) · 1f29fae2
      Serge E. Hallyn 提交于
      Add a no_file_caps boot option when file capabilities are
      compiled into the kernel (CONFIG_SECURITY_FILE_CAPABILITIES=y).
      
      This allows distributions to ship a kernel with file capabilities
      compiled in, without forcing users to use (and understand and
      trust) them.
      
      When no_file_caps is specified at boot, then when a process executes
      a file, any file capabilities stored with that file will not be
      used in the calculation of the process' new capability sets.
      
      This means that booting with the no_file_caps boot option will
      not be the same as booting a kernel with file capabilities
      compiled out - in particular a task with  CAP_SETPCAP will not
      have any chance of passing capabilities to another task (which
      isn't "really" possible anyway, and which may soon by killed
      altogether by David Howells in any case), and it will instead
      be able to put new capabilities in its pI.  However since fI
      will always be empty and pI is masked with fI, it gains the
      task nothing.
      
      We also support the extra prctl options, setting securebits and
      dropping capabilities from the per-process bounding set.
      
      The other remaining difference is that killpriv, task_setscheduler,
      setioprio, and setnice will continue to be hooked.  That will
      be noticable in the case where a root task changed its uid
      while keeping some caps, and another task owned by the new uid
      tries to change settings for the more privileged task.
      
      Changelog:
      	Nov 05 2008: (v4) trivial port on top of always-start-\
      		with-clear-caps patch
      	Sep 23 2008: nixed file_caps_enabled when file caps are
      		not compiled in as it isn't used.
      		Document no_file_caps in kernel-parameters.txt.
      Signed-off-by: NSerge Hallyn <serue@us.ibm.com>
      Acked-by: NAndrew G. Morgan <morgan@kernel.org>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      1f29fae2
    • M
      selinux: recognize netlink messages for 'ip addrlabel' · 2f99db28
      Michal Schmidt 提交于
      In enforcing mode '/sbin/ip addrlabel' results in a SELinux error:
      type=SELINUX_ERR msg=audit(1225698822.073:42): SELinux:  unrecognized
      netlink message type=74 for sclass=43
      
      The problem is missing RTM_*ADDRLABEL entries in SELinux's netlink
      message types table.
      
      Reported in https://bugzilla.redhat.com/show_bug.cgi?id=469423Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      2f99db28
  5. 05 11月, 2008 1 次提交
  6. 02 11月, 2008 1 次提交
  7. 01 11月, 2008 1 次提交
  8. 31 10月, 2008 1 次提交
  9. 30 10月, 2008 1 次提交
  10. 20 10月, 2008 3 次提交
  11. 14 10月, 2008 3 次提交
  12. 13 10月, 2008 1 次提交
  13. 10 10月, 2008 11 次提交
  14. 04 10月, 2008 2 次提交
    • P
      selinux: Fix an uninitialized variable BUG/panic in selinux_secattr_to_sid() · 3040a6d5
      Paul Moore 提交于
      At some point during the 2.6.27 development cycle two new fields were added
      to the SELinux context structure, a string pointer and a length field.  The
      code in selinux_secattr_to_sid() was not modified and as a result these two
      fields were left uninitialized which could result in erratic behavior,
      including kernel panics, when NetLabel is used.  This patch fixes the
      problem by fully initializing the context in selinux_secattr_to_sid() before
      use and reducing the level of direct context manipulation done to help
      prevent future problems.
      
      Please apply this to the 2.6.27-rcX release stream.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      3040a6d5
    • P
      selinux: Fix an uninitialized variable BUG/panic in selinux_secattr_to_sid() · 81990fbd
      Paul Moore 提交于
      At some point during the 2.6.27 development cycle two new fields were added
      to the SELinux context structure, a string pointer and a length field.  The
      code in selinux_secattr_to_sid() was not modified and as a result these two
      fields were left uninitialized which could result in erratic behavior,
      including kernel panics, when NetLabel is used.  This patch fixes the
      problem by fully initializing the context in selinux_secattr_to_sid() before
      use and reducing the level of direct context manipulation done to help
      prevent future problems.
      
      Please apply this to the 2.6.27-rcX release stream.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      81990fbd