clamd: its generated seccomp profile
Heimdall is a defensive sandbox. This directory holds the seccomp profile of clamd (ClamAV 1.5.4, docker.io/clamav/clamav@sha256:e19130cd…43ce5e, Alpine, musl) as Holger runs it: in its own sandbox container (scripts/clamd-sandbox.sh with podman, server/lib/src/sandbox/clamd.rs with crun on the box).
Lane HEIMDALL-ALLIN prof (2026-11-01). Nothing here was written or widened by hand:
x86_64-musl.probe.json: what clamd called, recorded byheimdall profile probe-exec(Heimdall 0.3, seccomp USER_NOTIF learning mode) around the real daemon, in Holger's container shape (--network none, read-only root, no capability, no-new-privileges, uid 100:101, 2 GiB memory, 256 pids, a 1 GiB/tmp, Holger'sclamd.conf); the outer seccomp filter was off while measuring, so no call was hidden from the probe.x86_64-musl.json,.oci.json,.rs: written byheimdall profile gen clamd --profiles server/sandbox/seccomp --libc muslfrom it. 58 rules, unknown call = kill the process; 0 near-miss, 0 W|X, 0 bare allows.socketonly as(AF_UNIX, SOCK_STREAM, 0)(the listener); noconnect, no exec, no mount.- Pin:
sha256:4a714c3dac4d4ac393accf15a5ba788120a58af1649a6a51583e890cc4e19f53(CLAMD_SECCOMP_SHA256inserver/sandbox/src/crun.rs).
crun applies crun::clamd_seccomp_profile(): this .oci.json plus RUNTIME_AFTER_FILTER (close_range, execve), the two calls crun itself makes after loading the filter and before clamd's first instruction (measured: without close_range crun is killed with SIGSYS before clamd starts).
The runs (scripts/clamd-profile.sh measure, scripts/clamd-profile-drive.py)
| Run | What it drives |
clamd_serves_holger |
zPING; zINSTREAM of the EICAR test string plain, in a zip, in a tar.gz and gzip'd; clean text; an empty stream; every package below; a zip nested 20 deep (Heuristics.Limits.Exceeded.MaxRecursion); 12 streams at once; zRELOAD, then EICAR again |
clamd_survives_bad_clients (error path) |
an unknown command, an INSTREAM cut mid-chunk, a chunk past StreamMaxLength, a connection closed at once, the n-form command |
clamd_runs_long |
an idle client past IdleTimeout and a stalled INSTREAM past ReadTimeout, PINGs for 640 s so clamd's SelfCheck (600 s) runs, then EICAR |
Real packages (CLAMD_PROFILE_PACKAGES), sha256:
bbb3de5707629e6a60a0c238cd477b28f07f0066982fda953fa6fcec39073a4a cli-64.exe
452b2d9787b7d366fa8cf5ed9a1c40404542d05effa7a598da03bbbbb76d9f31 guava-33.2.1-jre.jar
f201ed8cc8eb3015c0fec78ee06c43b8aad946e6d18df917b251d7f640cafd2c gunnar-fast-setup.pdf
65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a libc-0.2.191.crate
3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed pip-24.3.1-py2.py3-none-any.whl
f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d regex-1.13.1.crate
4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba serde-1.0.229.crate
27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5 setuptools-44.1.1-py2.py3-none-any.whl
b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3 tokio-1.54.1.crate
The kernel test
scripts/clamd-profile.sh test (privileged rootless podman not needed: plain rootless podman with crun; ran on oden, kernel 7.0, 2026-11-01): clamd under the profile as crun applies it serves the serve and errors runs green (EICAR found, packages OK, RELOAD), a shell exec'd into the container is killed by SIGSYS (exit 159, setgid outside the profile) and clamd stays up; clamd stops cleanly (exit 0).
Not measured yet: clamd over a signed signature bundle mounted at /var/lib/clamav (installed.json; the same loader, other database files), and freshclam (Holger never runs it). A drift check (re-probe, fail when a new call shows up) belongs to Heimdall's tooling lane.