mknod: Device nodes created mislabeled on SELinux, with broken cleanup (remove_dir on a node)
uutils calls `mknod` *before* setting the SELinux context (GNU uses `setfscreatecon` first, labeling atomically). If `set_selinux_security_context` fails, cleanup uses `std::fs::remove_dir`, which cannot remove device nodes or FIFOs, leaving the mislabeled node behind. **Impact:** on SELinux-enforcing systems the node is created with the wrong context; the command reports failure but leaves a mislabeled device node that may bypass mandatory access control, and orphaned nodes can persist across reboots. Recommendation: use `setfscreatecon` before `mknod`, abort on failure, and use `remove_file` for cleanup. **Remediation:** Acknowledged by Canonical. --- _Reported by Zellic in the *uutils coreutils Program Security Assessment* (prepared for Canonical, Jan 20 2026), audited commit `3a07ffc5a9bd4c283e75afa548ba1f1957bad242`. Finding 3.58. Credit: Zellic._
describes (1)
Related CVEs.
| ID | severity | exploitable | ||
|---|---|---|---|---|
| CVE-2026-35361US | medium4.4 | — | ||
The mknod utility in uutils coreutils fails to handle security labels atomically by creating device nodes before setting the SELinux context. If labeling fails, the utility attempt… | ||||
references
External citations — patches, advisories, analysis.
- https://github.com/uutils/coreutilsPACKAGE
- https://github.com/uutils/coreutils/commit/42b2ad83cdcf6e959ecb378c5040c60d9c64becfWEB
- https://github.com/uutils/coreutils/pull/10582WEB
- https://github.com/uutils/coreutils/releases/tag/0.6.0WEB
- https://github.com/uutils/coreutils/security/advisories/GHSA-r9hw-mj3w-phcqWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-35361ADVISORY
Advisories like this name the exposed products attackers go after on your perimeter. See what is exposed on your perimeter with a free passive scan.
Free scan