Low severity3.4NVD Advisory· Published Apr 22, 2026· Updated Apr 27, 2026
CVE-2026-35361
CVE-2026-35361
Description
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 attempts cleanup using std::fs::remove_dir, which cannot remove device nodes or FIFOs. This leaves mislabeled nodes behind with incorrect default contexts, potentially allowing unauthorized access to device nodes that should have been restricted by mandatory access controls.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
coreutilscrates.io | < 0.6.0 | 0.6.0 |
Affected products
1Patches
142b2ad83cdcfmknod: fix SELinux cleanup when context setting fails (#10582)
2 files changed · +19 −1
src/uu/mknod/src/mknod.rs+1 −1 modified@@ -94,7 +94,7 @@ fn mknod(file_name: &str, config: Config) -> i32 { config.context, ) { // if it fails, delete the file - let _ = std::fs::remove_dir(file_name); + let _ = std::fs::remove_file(file_name); eprintln!("{}: {}", uucore::util_name(), e); return 1; }
tests/by-util/test_mknod.rs+18 −0 modified@@ -240,3 +240,21 @@ fn test_mknod_selinux_invalid() { } } } + +#[test] +#[cfg(feature = "feat_selinux")] +fn test_mknod_selinux_invalid_cleanup() { + let scene = TestScenario::new(util_name!()); + let at = &scene.fixtures; + let dest = "test_fifo"; + + new_ucmd!() + .arg("--context=invalid_context_t") + .arg(at.plus_as_string(dest)) + .arg("p") + .fails() + .no_stdout(); + + // invalid context → node must not exist + assert!(!at.file_exists(dest)); +}
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/uutils/coreutils/pull/10582nvdExploitIssue TrackingPatchWEB
- github.com/advisories/GHSA-79rc-qpw3-jv92ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-35361ghsaADVISORY
- github.com/uutils/coreutils/commit/42b2ad83cdcf6e959ecb378c5040c60d9c64becfghsaWEB
- github.com/uutils/coreutils/releases/tag/0.6.0nvdRelease NotesWEB
News mentions
0No linked articles in our index yet.