NSA Security-Enhanced Linux (SELinux)



Similar documents
Secure computing: SELinux

Virtual Machine Security

The Case for SE Android. Stephen Smalley Trust Mechanisms (R2X) National Security Agency

Mandatory Access Control in Linux

SELinux. Security Enhanced Linux

Access Control Fundamentals

Security and Integrity of a Distributed File Storage in a Virtual Environment

Safety measures in Linux

Security Enhanced Linux and the Path Forward

Linux Distributed Security Module 1

Linux OS-Level Security Nikitas Angelinas MSST 2015

CAPP-Compliant Security Event Audit System for Mac OS X and FreeBSD

Networking in NSA Security-Enhanced Linux

Analysis of the Linux Audit System 1

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

A Survey of Access Control Policies

CSE543 - Introduction to Computer and Network Security. Module: Operating System Security

Using the Flask Security Architecture to Facilitate Risk Adaptable Access Controls

A Firewall Model of File System Security

How To Write Security Enhanced Linux On Embedded Systems (Es) On A Microsoft Linux (Amd64) (Amd32) (A Microsoft Microsoft 2.3.2) (For Microsoft) (Or

Using Likewise Enterprise to Boost Compliance with Sarbanes-Oxley

Introduction to Android 5 Security

Common Criteria Evaluation Challenges for SELinux. Doc Shankar IBM Linux Technology Center

Trusted RUBIX TM. Version 6. Multilevel Security in Trusted RUBIX White Paper. Revision 2 RELATIONAL DATABASE MANAGEMENT SYSTEM TEL

Securing Data in a RHEL SELinux Multi-Level Secure Environment

Advanced Systems Security: Retrofitting Commercial Systems

Android Security. Giovanni Russello

Mandatory Access Control

LSM-based Secure System Monitoring Using Kernel Protection Schemes

Confining the Apache Web Server with Security-Enhanced Linux

Capability-Based Access Control

Advanced Systems Security

SELinux & AppArmor - Comparison of Secure OSes

2972 Linux Options and Best Practices for Scaleup Virtualization

The Flask Security Architecture A Flexible Mandatory Access Control Mechanism For Use in Multiple Secure Systems

The Art of Virtualization with Free Software

Secure to the Core: The Next Generation Secure Operating System from CyberGuard

Introduction to Computer Security

Security Overview of the Integrity Virtual Machines Architecture

CMSC 421, Operating Systems. Fall Security. URL: Dr. Kalpakis

Navigating Endpoint Encryption Technologies

Linux Kernel Architecture

Kernel Intrusion Detection System

Secure Virtual Machine Systems

A COMPARISON BETWEEN THE SAMBA3 AND LIKEWISE LWIOD FILE SERVERS

Security Enhanced (SE) Android: Bringing Flexible MAC to Android

WILL ANDROID TROJAN, WORM OR ROOTKIT SURVIVE IN SEANDROID AND CONTAINERIZATION?

Survey on Linux Security and Vulnerabilities

Red Hat. By Karl Wirth

SELinux Policy Management Framework for HIS

-.% . /(.0/ ) 53%/( (01 (%((. * 7071 (%%2 $,( . 8 / 9!0/!1 . # (3(0 31.%::((. ;.!0.!1 %2% . ".(0.1 $) (%+"",(%$.(6

CS 416: Opera-ng Systems Design

Protection of Components based on a Smart Card Enhanced Security Module

KVM Security - Where Are We At, Where Are We Going

Bypassing Firewalls: Tools and Techniques

User-level processes (clients) request services from the kernel (server) via special protected procedure calls

Database Security Part 7

COS 318: Operating Systems. Virtual Machine Monitors

White Paper Levels of Linux Operating System Security

Vormetric Encryption Architecture Overview

Access Control Lists in Linux & Windows

Solution Guide Parallels Virtualization for Linux

Proceedings of the 11 th USENIX Security Symposium

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

VMWARE Introduction ESX Server Architecture and the design of Virtual Machines

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Introduction to Labeled Networking on Linux

Red Hat Linux Internals

Reference Guide for Security in Networks

CMPT 471 Networking II

Virtual Hosting & Virtual Machines

Analysis of Open Source Drivers for IEEE WLANs

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

BM482E Introduction to Computer Security

Open Directory. Apple s standards-based directory and network authentication services architecture. Features

9/26/2011. What is Virtualization? What are the different types of virtualization.

Storage Management for the Oracle Database on Red Hat Enterprise Linux 6: Using ASM With or Without ASMLib

Summary. I. V. Arzamartsev, G. I. Borzunov A Method of Analysis of Multithreaded Applications Based on Symbolic Execution

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

evm Virtualization Platform for Windows

Certification Report

SDN AND SECURITY: Why Take Over the Hosts When You Can Take Over the Network

Encryption Wrapper. on OSX

Building Docker Cloud Services with Virtuozzo

Host-based Intrusion Prevention on Windows and UNIX. Dr. Rich Murphey White Oak Labs

Oracle Solaris Security: Mitigate Risk by Isolating Users, Applications, and Data

Novell Storage ServicesTM File System Administration Guide for Linux

Transcription:

NSA Security-Enhanced Linux (SELinux) http://www.nsa.gov/selinux Stephen Smalley sds@epoch.ncsc.mil Information Assurance Research Group National Security Agency Information Assurance Research Group 1

Operating System Security Why secure the OS? Increasing risk to valuable information Information attacks don t require a corrupt user Applications can be circumvented Must process in the clear Network too far/hardware too close Key missing feature: Mandatory Access Control (MAC) Administratively-set security policy Control over all processes and objects Decisions based on all security-relevant information Information Assurance Research Group 2

Why is DAC inadequate? Decisions are only based on user identity and ownership No protection against malicious or flawed software Each user has complete discretion over his objects Only two major categories of users: administrator and other Many system services and privileged programs must run with coarse-grained privileges or even full administrator access. Information Assurance Research Group 3

What can MAC offer? Strong separation of security domains Separate data based on confidentiality/integrity/purpose System, application, and data integrity Protect against unauthorized modifications Prevent ill-formed modifications Ability to limit program privileges Safely run code of uncertain trustworthiness Prevent exploit of flaw in program from escalating privilege Limit each program to only what is required for its purpose Information Assurance Research Group 4

What can MAC offer? Processing pipeline guarantees Ensure that data is processed as required Split processing into small, minimally trusted stages Encryption, sanitization, virus scanning Authorization limits for legitimate users Decompose administrator role Partition users into classes based on position, clearance, etc. Information Assurance Research Group 5

MAC Implementation Issues Must overcome limitations of traditional implementations More than just Multilevel Security / BLP Address integrity, least privilege, separation of duty issues Complete control using all security-relevant information Policy flexibility required One size does not fit all! Ability to change the model of security Ability to express different policies within given model Separation of policy from enforcement Maximize security transparency Information Assurance Research Group 6

SELinux provides Flexible MAC Flexible comprehensive mandatory access controls integrated into the Linux kernel Building on 10 years of NSA s OS Security research Application of NSA s Flask security architecture Cleanly separates policy from enforcement using well-defined policy interfaces Allows users to express policies naturally and supports changes Fine-grained controls over kernel services Transparent to applications and users Role-Based Access Control, Type Enforcement, optional Multi-Level Security, easily extensible to other models Highly configurable Information Assurance Research Group 7

Current Directions Transfer to mainline Linux 2.5/2.6 kernel General security framework/hooks (LSM) already merged Reworked SELinux APIs and implementation for merging SELinux module in 2.6.0-test1-mm series Kernel Integration Issues API File labeling Initialization Network access controls Coding style / code cleanup Information Assurance Research Group 8

API Changes Motivation: Removal of sys_security from 2.5. Required reworking SELinux API to meet kernel developers' criteria. SELinux API refactored into three components: Add /proc/pid/attr API for process attributes (in 2.5). Re-use existing xattr API for file attributes (in 2.5). Add selinuxfs pseudo filesystem for security policy API. Support for SELinux extensions for System V IPC and socket IPC to be reinvestigated in the future. libselinux encapsulates all three components. Information Assurance Research Group 9

API Changes Pass contexts, not SIDs. Set-attribute calls instead of extended calls: execve_secure() => setexeccon();execve(); open/mkdir_secure() => setfscreatecon();open/mkdir(); Implemented via writes to /proc/self/attr/{exec,fscreate}. Cleared explicitly by program or automatically upon exec. Simplifies common case, but requires extra care for: Multi-threaded applications (if not 1-to-1 user-to-kernel). Signal handlers that call execve() or open/mkdir(). Information Assurance Research Group 10

API Changes Explicit API for obtaining process contexts No longer stat_secure on /proc/pid inodes getcon(), getprevcon(), getfscreatecon(),getexeccon() getpidcon() for other processes Implemented via reads of /proc/pid/attr/* File context API layered on top of xattr API [gs]etfilecon, l[gs]etfilecon, f[gs]etfilecon Hides xattr name, handles allocation of context buffers Information Assurance Research Group 11

API Changes Security Policy API layered on top of selinuxfs Selinuxfs modeled after 2.5 nfsd, transaction based IO. Removed calls for converting between SIDs and contexts. Added security_check_context. Changed security_load_policy to take (data,size) pair. Renamed calls to reflect elimination of SIDs, clarify meaning, and provide consistency in naming. Information Assurance Research Group 12

File Labeling Changes Motivation: Re-use xattr API and support included in 2.5. Reworked LSM hooks and added xattr handlers to support use of xattr by security modules (in 2.5). Changed SELinux to use xattr when available. Added hooks and devpts xattr handler to support setting security labels on ptys (in 2.5). Added hook to support /proc/pid inode security labeling based on associated task (in 2.5). Information Assurance Research Group 13

Initialization Changes Early initialization for security modules. Required for SELinux to set up security state for all kernel objects. Replaced SELinux-specific patch with a security initcall patch created for LSM by Chris Wright of WireX. Initial policy load Reworked API to move initial policy load to userspace. Presently performed via an initrd, may migrate to initramfs. Set up existing superblocks and inodes after initial load. Information Assurance Research Group 14

Network Access Control Changes Motivation: Many of the LSM network security fields and hooks rejected for 2.5. Retained general socket layer hooks and Unix domain socket hooks. Reworking sock_rcv_skb hook and NetFilter hooks to provide subset of original SELinux functionality. Revisiting set of network access controls based on experience to date. Information Assurance Research Group 15

Coding style cleanups Linux nativization of legacy code Consistency with kernel conventions Error return codes Single return paths Typedef extermination Using kerneldoc General code review and cleanup Locking review Information Assurance Research Group 16

Future Directions Refine locking to enhance scalability Further userland integration Complete integration into networked environment Integrate with 2.5/6 IPSEC implementation Integrate with NFSv4 Security-Enhanced X Design report available Policy specification and analysis tools Platform for application security mechanisms Information Assurance Research Group 17

Questions? http://www.nsa.gov/selinux/ Information Assurance Research Group 18

End of Presentation Information Assurance Research Group 19