Shared host IPC namespace

Remove unnecessary host IPC sharing and isolate interprocess communication resources.

Description

ipc: "host" puts the service in the host’s interprocess communication (IPC) namespace, where it can see resources such as shared memory segments.

Potential impact

A container process with sufficient permissions can read or change IPC resources used by host processes or other workloads.

Remediation

Remove ipc: "host" to use the default IPC isolation. If a diagnostic tool needs host IPC, put it in a separate configuration and limit the tool’s user permissions and capabilities.

Examples

Replace sample/app:latest with your application image.

Before

yaml
services:
  webapp:
    image: sample/app:latest
    ipc: "host"

After

yaml
services:
  webapp:
    image: sample/app:latest

References