1. Oct 13, 2011
  2. Oct 12, 2011
  3. Sep 28, 2011
  4. Sep 27, 2011
  5. Sep 26, 2011
  6. Sep 21, 2011
  7. Sep 19, 2011
    • Tetsuo Handa's avatar
      TOMOYO: Allow specifying domain transition preference. · 6bce98ed
      Tetsuo Handa authored
      
      
      I got an opinion that it is difficult to use exception policy's domain
      transition control directives because they need to match the pathname specified
      to "file execute" directives. For example, if "file execute /bin/\*\-ls\-cat"
      is given, corresponding domain transition control directive needs to be like
      "no_keep_domain /bin/\*\-ls\-cat from any".
      
      If we can specify like below, it will become more convenient.
      
        file execute /bin/ls keep exec.realpath="/bin/ls" exec.argv[0]="ls"
        file execute /bin/cat keep exec.realpath="/bin/cat" exec.argv[0]="cat"
        file execute /bin/\*\-ls\-cat child
        file execute /usr/sbin/httpd <apache> exec.realpath="/usr/sbin/httpd" exec.argv[0]="/usr/sbin/httpd"
      
      In above examples, "keep" works as if keep_domain is specified, "child" works
      as if "no_reset_domain" and "no_initialize_domain" and "no_keep_domain" are
      specified, "<apache>" causes domain transition to <apache> domain upon
      successful execve() operation.
      
      Moreover, we can also allow transition to different domains based on conditions
      like below example.
      
        <kernel> /usr/sbin/sshd
        file execute /bin/bash <kernel> /usr/sbin/sshd //batch-session exec.argc=2 exec.argv[1]="-c"
        file execute /bin/bash <kernel> /usr/sbin/sshd //root-session task.uid=0
        file execute /bin/bash <kernel> /usr/sbin/sshd //nonroot-session task.uid!=0
      
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      6bce98ed
  8. Sep 16, 2011
  9. Sep 15, 2011
  10. Sep 14, 2011
    • Tetsuo Handa's avatar
      TOMOYO: Avoid race when retrying "file execute" permission check. · a8f76409
      Tetsuo Handa authored
      
      
      There was a race window that the pathname which is subjected to "file execute"
      permission check when retrying via supervisor's decision because the pathname
      was recalculated upon retry. Though, there is an inevitable race window even
      without supervisor, for we have to calculate the symbolic link's pathname from
      "struct linux_binprm"->filename rather than from "struct linux_binprm"->file
      because we cannot back calculate the symbolic link's pathname from the
      dereferenced pathname.
      
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      a8f76409
    • Tetsuo Handa's avatar
      TOMOYO: Allow domain transition without execve(). · 731d37aa
      Tetsuo Handa authored
      
      
      To be able to split permissions for Apache's CGI programs which are executed
      without execve(), add special domain transition which is performed by writing
      a TOMOYO's domainname to /sys/kernel/security/tomoyo/self_domain interface.
      
      This is an API for TOMOYO-aware userland applications. However, since I expect
      TOMOYO and other LSM modules to run in parallel, this patch does not use
      /proc/self/attr/ interface in order to avoid conflicts with other LSM modules
      when it became possible to run multiple LSM modules in parallel.
      
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      731d37aa
    • Tetsuo Handa's avatar
      TOMOYO: Allow controlling generation of access granted logs for per an entry basis. · 1f067a68
      Tetsuo Handa authored
      
      
      Add per-entry flag which controls generation of grant logs because Xen and KVM
      issues ioctl requests so frequently. For example,
      
        file ioctl /dev/null 0x5401 grant_log=no
      
      will suppress /sys/kernel/security/tomoyo/audit even if preference says
      grant_log=yes .
      
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      1f067a68
    • Tetsuo Handa's avatar
      TOMOYO: Add socket operation restriction support. · 059d84db
      Tetsuo Handa authored
      
      
      This patch adds support for permission checks for PF_INET/PF_INET6/PF_UNIX
      socket's bind()/listen()/connect()/send() operations.
      
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      059d84db
    • Tetsuo Handa's avatar
      TOMOYO: Add environment variable name restriction support. · d58e0da8
      Tetsuo Handa authored
      This patch adds support for checking environment variable's names.
      Although TOMOYO already provides ability to check argv[]/envp[] passed to
      execve() requests,
      
        file execute /bin/sh exec.envp["LD_LIBRARY_PATH"]="bar"
      
      will reject execution of /bin/sh if environment variable LD_LIBRARY_PATH is not
      defined. To grant execution of /bin/sh if LD_LIBRARY_PATH is not defined,
      administrators have to specify like
      
        file execute /bin/sh exec.envp["LD_LIBRARY_PATH"]="/system/lib"
        file execute /bin/sh exec.envp["LD_LIBRARY_PATH"]=NULL
      
      . Since there are many environment variables whereas conditional checks are
      applied as "&&", it is difficult to cover all combinations. Therefore, this
      patch supports conditional checks that are applied as "||", by specifying like
      
        file execute /bin/sh
        misc env LD_LIBRARY_PATH exec.envp["LD_LIBRARY_PATH"]="/system/lib"
      
      which means "grant execution of /bin/sh if environment variable is not defined
      or is defined and its...
      d58e0da8
  11. Sep 10, 2011