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.
Problem types
CWE-281: Improper Preservation of Permissions
Product status
Any version before 0.6.0
Credits
Zellic
References
github.com/uutils/coreutils/pull/10582
github.com/uutils/coreutils/pull/10582
github.com/uutils/coreutils/releases/tag/0.6.0