Bug 2583156 (CVE-2026-135901)

Summary: CVE-2026-135901 shadow-utils: shadow-utils: newgidmap and newuidmap improperly validate file descriptor location, allowing local file corruption via bind mount
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: akhatavk, aos-team-art-private, asdas, dpaolell, jdelft, jupierce, lgarciaa, mbiarnes, ppalepu, ppostler, prdhamdh, rhel-process-autobot, sghai, sidsharm, suppawar, vlaad, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in shadow-utils. The newgidmap and newuidmap utilities validate that a caller-supplied file descriptor refers to a directory on the /proc filesystem by comparing device numbers, then open a file by name relative to that directory to write privileged group/user ID mapping data. A local, unprivileged user can use Linux user and mount namespaces to bind-mount an attacker-chosen file over the expected path, defeating the device-number check and causing the helper to overwrite the first five bytes of the attacker-chosen file with fixed content.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-11-24 11:34:55 UTC
The newgidmap and newuidmap helper utilities accept a directory file descriptor identifying a target process's /proc/<pid>/ directory, and validate that this descriptor refers to the procfs filesystem by comparing device numbers (st_dev/st_rdev) against a known procfs path. After this check, the utilities open a file (for example "setgroups") by name relative to that directory descriptor and write privileged uid/gid mapping data to it.

An unprivileged local user can defeat this validation using Linux user and mount namespaces: by bind-mounting an arbitrary, attacker-chosen file over the expected child path inside a procfs directory they hold a descriptor to, the device-number check (which only inspects the directory itself) still passes, while the subsequent open-by-name resolves through the bind mount to the attacker's chosen file instead of the intended procfs file. This redirects the helper's privileged write, resulting in the first five bytes of the attacker-chosen file being overwritten with the fixed content "deny\n".

This was reported publicly, with a working proof of concept demonstrating the primitive against a SUID-root build of newgidmap, and fixed upstream in shadow 4.20.4 by using openat2(2) with RESOLVE_NO_XDEV for path resolution and by removing the affected "fd:N" argument form entirely.