GitHub Advisoryadvisory · crates.io

GHSA-r9hw-mj3w-phcq mknod: Device nodes created mislabeled on SELinux, with broken cleanup (remove_dir on a node)

LOW Published 2026-07-06 Modified 2026-07-06 Official page ↗
Aliases
CVE-2026-35361
Ecosystem
crates.io
Packages
uu_mknod
Severity
Low
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
Weaknesses
CWE-281, CWE-459, CWE-732
Reviewed
2026-07-06

Affected packages

• crates.io uu_mknod: < 0.6.0 → fixed in 0.6.0

Description

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._

Related

Alias · CVE (1)

  • CVE-2026-35361 The mknod utility in uutils coreutils fails to handle security labels atomically by creating device nodes before setting the SELinux… vulnerability

Weakness · CWE (3)

  • CWE-281 Improper Preservation of Permissions weakness
  • CWE-459 Incomplete Cleanup weakness
  • CWE-732 Incorrect Permission Assignment for Critical Resource weakness

References