---
title: "HOST-CTR-005 Docker Container Logs Have No Size Limit"
canonical: https://openvapt.com/checks/HOST-CTR-005.html
html: https://openvapt.com/checks/HOST-CTR-005.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-CTR-005 Docker Container Logs Have No Size Limit

Checks whether the Docker daemon's default log driver caps log file size and rotation.

- Domain: Server
- Severity: Low
- Control category: Logging and Monitoring
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- CIS Controls v8: 8.3
- NIST CSF 2.0: PR.PS-04
- CWE: CWE-779, CWE-770
- NIST SP 800-53 Rev. 5: AU-4, SC-5, CM-6
- Benchmark topic: CIS Docker Benchmark 2.12 (centralised and bounded container logging) (topic only, no benchmark text)

## Why It Matters

With the default json-file driver and no max-size, a chatty or attacked container can fill the disk with its own logs and take the host and every other container down. Bounded, rotated logs also keep evidence manageable for investigations.

## How It Detects

Reads /etc/docker/daemon.json. Fails when log-driver is json-file or unset and log-opts lacks max-size, or when a container's LogConfig uses json-file without max-size. Drivers that ship logs elsewhere (journald, syslog, fluentd, awslogs) pass.

## How to Fix

Add to /etc/docker/daemon.json:  "log-driver": "json-file", "log-opts": {"max-size": "10m", "max-file": "3"}  (or use journald) and restart Docker; recreate containers that set their own LogConfig.

## How to Verify

```
docker info --format '{{.LoggingDriver}}' ; grep -A3 log-opts /etc/docker/daemon.json
```

## Learn the Theory

- [P9 Containers and Kubernetes](https://openvapt.com/academy/p9.md)
- [A5 Container Runtime Hardening Depth](https://openvapt.com/academy/a5.md)

## References

- [Docker documentation, Configure logging drivers](https://docs.docker.com/engine/logging/configure/)
- [NIST SP 800-190, Application Container Security Guide](https://csrc.nist.gov/pubs/sp/800/190/final)
- [CIS Docker Benchmark (referenced by recommendation number)](https://www.cisecurity.org/benchmark/docker)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/containers_depth.go

Run it: `openvapt scan --only HOST-CTR-005`. Read it offline: `openvapt explain HOST-CTR-005`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-CTR-005.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
