Repository navigation
Collect the BlueField SNAP-4 container version and grade it per release train - #111
aliencaocao wants to merge 16 commits into
Conversation
…se train SNAP-4 runs on the DPU Arm cores, so the virtio-net check reads it on the same DPU path: locally on a DPU, otherwise one RShim SSH command that lists the running containers (crictl, retried under sudo -n) and the kubelet manifests. The read never pulls, starts, stops, or execs into a container. security_version_audit.py grades each reading against its own train in snap4Container (4.5 -> 4.5.5, 4.9 -> 4.9.1). A version between or below the trains moves to the next fix above it, and one newer than every fix passes. A below-minimum reading fails whatever the coverage; passing readings clear the cluster only when every DPU was read or cannot run SNAP-4 now. The result is a new snap4-container check in cmax audit security and a securityVersions.snap4Container criterion in the full audit.
Real-cluster testing (wheel built from 6e4673d)Hydra
VP
Not tested on hardware |
Slurm-on-Kubernetes slurmd images (CoreWeave SUNK) ship without pciutils but mount the host sysfs, so the BlueField-3 scan, and the SNAP-4 scope that depends on it, were left unread. Fall back to /sys/bus/pci/devices and record pciSource on the host record.
On CoreWeave SUNK sudo -n works and mlxconfig is simply absent, but the reason said the sudo retry did not answer. Name the missing tool instead.
CoreWeave SUNK test (crwv-1, crwv-3)Both clusters run Slurm-on-Kubernetes. slurmd pods have no lspci, mlxconfig, mstconfig, crictl, or RShim (
crwv-2 stayed queued behind other jobs, so I cancelled it. The run found two problems, now fixed on this branch:
Both The actual SNAP-4 read path (mode read, then the container listing on the DPU) still has not run on real hardware: no cluster tested so far has mlxconfig plus a BlueField-3 in DPU mode. This stays a draft until that runs, on VP. |
|
VP test (16× GB300 worker-[1-16], Slurm 26.05.4), wheel = this branch + #114:
Staying draft. |
The full mlxconfig -e -d <dev> q dump took 22 s on an idle GB300 BlueField-3 host (about 60 s with three reads in flight), past the 15 s tool timeout, so 14 of 16 VP hosts graded the mode unreadable. Naming INTERNAL_CPU_MODEL, INTERNAL_CPU_OFFLOAD_ENGINE and INTERNAL_CPU_RSHIM answers in under 2 s. Firmware that rejects a name falls back to the full dump once, under the privilege that opened the device, with a 60 s budget.
|
VP re-test with NVIDIA MFT 4.33.0-169 (arm64, userspace
|
MFT reports a parameter the firmware does not carry as "-E- The Device doesn't support X parameter" (seen on a ConnectX-8 with MFT 4.33), not "Unknown Parameter". Treat both as the device having opened, so older BlueField-3 firmware still reaches the full-dump fallback.
…ode fix
NVIDIA does not support the zero-trust (mlxprivhost restricted) profile in
NIC mode ("Operating in NIC Mode with Zero Trust (Restricted) configuration
is not supported and may lead to undefined behavior", BlueField BSP 4.10),
yet a NIC-mode card with INTERNAL_CPU_RSHIM=0 graded fail and told the
provider to run mlxprivhost r.
The isolation evidence now carries platformMode, "nic" only when every host
with an unrestricted RShim read NIC mode. In NIC mode with no open
/dev/rshim0 or tmfifo_net0 the verdict is warn and recommends
mlxconfig -d <device> s INTERNAL_CPU_RSHIM=1 plus a power cycle; an open
path still fails but names the NIC-mode fix. DPU or unread mode keeps the
zero-trust grade.
…ode fix A host root can open RShim on a NIC-mode BlueField-3 with INTERNAL_CPU_RSHIM=0: on VP the RShim PCIe function (0xc2d5) is exposed and unbound, mlxprivhost reports PRIVILEGED with disable_rshim FALSE, and NVIDIA's rshim user-space driver needs no kernel module. Through it a tenant reaches the DPU boot and console interface and can push a boot stream that outlives the tenancy, so the warning understated it. The status goes back to fail. What stays from the previous commit is the remediation: NIC mode names mlxconfig INTERNAL_CPU_RSHIM=1 plus a power cycle instead of mlxprivhost, which NVIDIA does not support in NIC mode.
…Shim A tenant with host root can undo INTERNAL_CPU_RSHIM, so the two-way recommendation was incomplete: where you cannot block that access, re-image the card from a known-good BFB per tenant. Where you can, keep tenant host root off the BlueField while it is in NIC mode. Where you want the host gone entirely, run DPU mode with mlxprivhost restricted, which NVIDIA supports there.
|
Updated the NIC-mode RShim remediation to name all three provider-side options:
NVIDIA does not support mlxprivhost zero-trust in NIC mode, so option 3 requires a mode change. |
Ports the provider-remediation part of the private review (Jordan): the static fix no longer prescribes mlxprivhost zero-trust in NIC mode, which NVIDIA does not support. In NIC mode the provider must enforce RShim isolation or re-image from a trusted BFB between tenants.
Follow-up to #109. #109 publishes
snap4Container(NVIDIA bulletin 5744) with one fix per release train, but nothing in the audit reads a SNAP-4 version yet. This PR adds the read and the grade.Collection
SNAP-4 runs as a container on the BlueField-3 Arm cores, so the virtio-net check reads it on the same DPU path it already uses for the controller:
BatchMode=yes, so it never prompts, and nothing is written to known_hosts.crictl psandcrictl images, retrying undersudo -n, and reads the version from thedoca_snap:<x.y.z>-doca…image tag. If no container is running, the version comes from the kubelet manifest in/etc/kubelet.d, since kubelet starts that image on restart.version,not_installed(the DPU answered with no SNAP-4),not_running(NIC mode),not_applicable,incompleteorunknown.Grade (
securityVersions.snap4Container)Each reading is graded against its own train:
The worst reading decides the cluster result:
not_applicablefor no BlueField-3, no SNAP-4 deployed, or NIC mode. In DPU mode the result isunknown, which asks the provider to attest.snap4Container, a reading gradesunknown, while absence still gradesnot_applicable.Surfaces
snap4-containercheck incmax audit security. The bulletin link and CVEs come from the minimum table.securityVersions.snap4Container.statuscriterion in the full audit, reproduction commands, the website anchor and the README lists.unknownthere.Tests
tests/audit/test_snap4_container.py(28 tests) covers:Existing contract tests now also cover
--snap4-json. The full suite passes on 3.14 and the touched files pass on 3.10.