Impact & Risk Analysis
- Severity: High
- CIS Benchmark: CIS 5.17
- Impact: Shared Memory Access & Data Leakage. The IPC (Inter-Process Communication) namespace provides separation of named shared memory segments, semaphores, and message queues. If a container shares the host’s IPC namespace, processes inside the container can see all IPC communications on the host system. An attacker could potentially read sensitive data from shared memory or manipulate semaphores to crash host applications.
Common Misconfiguration
Starting a container with the--ipc=host flag. This is sometimes done for high-performance applications that need to communicate with the host via shared memory, but it removes a critical layer of isolation.
Vulnerable Example
Secure Example
Audit Procedure
Run the command below to inspect the IPC mode of all containers:- Result: Check the
IpcModevalue for each container. - Fail: If it returns
host. - Pass: If it returns
privateorshareable(default), or the container’s own ID.
Remediation
You should not start a container with the--ipc=host argument. By default, all containers have their own IPC namespace enabled, ensuring that shared memory segments and message queues are isolated from the host system.
