# Include host swap in Docker tmpfs confidentiality reviews

> Memory-backed temporary files are not automatically excluded from every disk path.

- Canonical URL: https://update.dsesecurity.com/updates/include-host-swap-in-docker-tmpfs-confidentiality-reviews/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-10-20T18:15:05+00:00
- Modified: 2026-10-20T18:34:32+00:00
- Last reviewed by DSE: 2026-10-20
- Resource type: Guide
- DSE priority: Information
- Topics: IT, Networks & Infrastructure
- Reading time: 2 minutes

## What you need to know

Memory-backed temporary files are not automatically excluded from every disk path.

## Potentially affected

Review Linux Docker tmpfs lifetime, memory accounting and the documented possibility of swap-file persistence.

## DSE recommendation

DSE recommends examining host swap policy and memory limits when tmpfs holds credentials or other sensitive working data.

## Article

Memory-backed temporary files are not automatically excluded from every disk path.

## Source facts

Docker tmpfs mounts store temporary data in memory and remove their contents when the container stops. Docker notes that the Linux tmpfs implementation can write data to swap, allowing it to reach a filesystem. Memory-backed storage also counts toward the container’s memory cgroup allowance; a larger mount size does not supply additional physical memory.

Source: [Docker documentation — tmpfs mounts](https://docs.docker.com/engine/storage/tmpfs/).

## Applicability

Review Linux Docker tmpfs lifetime, memory accounting and the documented possibility of swap-file persistence.

## DSE recommendation

DSE recommends examining host swap policy and memory limits when tmpfs holds credentials or other sensitive working data. Give each temporary directory a size expectation and cleanup owner. Do not use memory placement alone as the stated confidentiality control. Check whether the application can regenerate the data after a stop and whether a memory-pressure event could interrupt work. Keep durable records on a separately designed persistence path instead of assuming the temporary mount will survive container replacement.

## Verification

In an isolated test, inspect mount options, host swap configuration, and container memory accounting. Fill only a safe amount of disposable data, observe memory usage, then stop and recreate the container to confirm expected loss. Record the confidentiality boundary without collecting real secret contents in diagnostics. Have the platform owner record the approved swap and memory policy beside the mount definition. Keep the recovery expectation explicit: identify which temporary artifacts should disappear and which business records must be reconstructed or stored elsewhere.

## Official reference

[Docker documentation — tmpfs mounts](https://docs.docker.com/engine/storage/tmpfs/). Reviewed October 20, 2026.

## Primary reference

- Name: Docker documentation — tmpfs mounts
- Authority: docs.docker.com
- URL: https://docs.docker.com/engine/storage/tmpfs/
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Include host swap in Docker tmpfs confidentiality reviews,” DSE Security, https://update.dsesecurity.com/updates/include-host-swap-in-docker-tmpfs-confidentiality-reviews/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
