Proactive Security Roadmap 1

Status

Introduction

Establish a first-step strategy for implementing proactive security features in Ubuntu.

Rationale

As stated in UbuntuDownUnder/BOFs/ProactiveSecurityRoadmap, We want to reduce the risk of security holes in Ubuntu systems by reducing the number of potential attack vectors and find general solutions for preventing common classes of vulnerabilities. This confines the impact of actual vulnerabilities to a minimum. The amount of stuff we can do is massive; therefor, this specification choses a small set of useful enhancements to implement first as Stage 1 of the entire process.

Visuals: Normal vs. Protected (protections: address randomization; position independent executables; memory protection policy; stack smash protector)

Scope and Use Cases

Implementation Plan

Data Preservation and Migration

Does not apply here.

Packages Affected

Kernel:

SELinux Policy:

gcc:

Outstanding Issues

These outstanding issues need to be considered; however, they are out of the scope of this stage. These considerations will become important for Stage 2.

There are also a few political considerations that need to be examined.

There are also a few technical issues that need solving before this stage is complete. Breakage issues will mainly be solved during development and testing; the problems they cause are usually very transparent, as the typical result is that the kernel complains loudly by terminating the offending application.

Comments

JohnMoser: GrSecurity has a rudimentary but good brute force deterrance scheme, which makes fork() enter a queue that gets one execution per 30 seconds when called if a PaX kill or segmentation fault is encountered in a child fork() process with the same executable image. This causes one fork() to occur every 30 seconds. As expected, this is a hugely visible denial-of-service attack; but hey, we're making broken code safe, it's not going to be pretty so don't try. Obviously this DoS can only occur if an already existing security hole is attacked, so clean programs are unaffected. It may be possible to devise a less intrusive model that is almost as effective.

Here are some useful links that should also be considered.

Hardened Gentoo guide to executable stacks. This guide explains to Gentoo developers the basics of removing executable stacks from the system. This is important to get SELinux execstack/execmem/execheap/execmod permissions working properly. For example, currently a kernel running with the mprotect() from PaX prevents proper logging in; these four SELinux permissions are together almost functionally equivalent with PaX mprotect(). The issue is that libgcrypt.so has an execstack bit, and these kinds of restrictions (SELinux execstack in particular) make glibc abort loading the binary due to not gaining an executable stack.

The reason behind the executable stack bit must be ascertained and corrected, whether it be an inappropriate marking, a trampoline, or bad assembly code. This will require a small, dedicated team akin to the one Gentoo has; collaboration with Gentoo's Hardened team may be extremely beneficial.

pax-utils. Useful guide to using PaX utils, which help in finding certain anomolies in elf binaries, such as executable stacks and .text relocations.

SELinux helps to discover bugs in Fedora

ProactiveSecurityRoadmap1 (last edited 2008-08-06 16:27:51 by localhost)