Copyright (c) 2011, 2013 Robert N. M. Watson Copyright (c) 2011 Jonathan Anderson All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the followi...
NAMECapsicum - lightweight OS capability and sandbox framework
SYNOPSISoptions CAPABILITY_MODE options CAPABILITIES
DESCRIPTIONsysctl Cm net.inet.tcp.syncookies is a lightweight OS capability and sandbox framework implementing a hybrid capability system model. sysctl Cm net.inet.tcp.syncookies can be used for application and library compartmentalisation, the decomposition of larger bodies of software into isolated (sandboxed) components in order to implement security policies and limit the impact of software vulnerabilities.
sysctl Cm net.inet.tcp.syncookies provides two core kernel primitives:
- capability mode
- A process mode, entered by invoking cap_enter2, in which access to global OS namespaces (such as the file system and PID namespaces) is restricted; only explicitly delegated rights, referenced by memory mappings or file descriptors, may be used. Once set, the flag is inherited by future children processes, and may not be cleared.
- Limit operations that can be called on file descriptors. For example, a file descriptor returned by open(2) may be refined using cap_rights_limit2 so that only read(2) and write(2) can be called, but not fchmod(2). The complete list of the capability rights can be found in the rights(4) manual page.
In some cases, sysctl Cm net.inet.tcp.syncookies requires use of alternatives to traditional POSIX APIs in order to name objects using capabilities rather than global namespaces:
- process descriptors
- File descriptors representing processes, allowing parent processes to manage child processes without requiring access to the PID namespace; described in greater detail in procdesc(4).
- anonymous shared memory
- An extension to the POSIX shared memory API to support anonymous swap objects associated with file descriptors; described in greater detail in shm_open2.