Bug 2585472

Summary: CVE-2026-137898 pam: Linux-PAM pam_econf local privilege escalation via relative "(null)" config directory from empty vendor directory handling [fedora-all]
Product: [Fedora] Fedora Reporter: Vladimir Vasilev <vvasilev>
Component: pamAssignee: Tomas Halman <thalman>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: besser82, ipedrosa, thalman
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["0ec1a0e0-8869-453d-8bb0-a81664e85f13"]}
Fixed In Version: Doc Type: ---
Doc Text:
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:
Bug Depends On:    
Bug Blocks: 2585412    

Description Vladimir Vasilev 2026-11-27 14:19:42 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

A flaw was found in Linux-PAM's pam_econf configuration handling. When Linux-PAM is built with libeconf and an empty vendor directory, the search list passed to libeconf becomes "PARSING_DIRS=(null):/etc": the NULL vendor directory is formatted as the literal text "(null)", which libeconf opens as a directory relative to the current working directory. A local user can create a "(null)" directory with environment.d drop-ins in a world-writable folder (e.g. /tmp); when an administrator runs sudo from that folder, pam_env loads the attacker's variables, including LD_PRELOAD, which bypass sudo's env_reset filtering (the PAM environment is merged unconditionally) and reach the command run as root, leading to full local privilege escalation. Confirmed by code review and reproduced end to end (marker payload ran as uid=0 euid=0 via sudo from a world-writable directory) in a Fedora 44 container with the shipped pam 1.7.2-2.fc44; Fedora 43-45 and rawhide are affected, Fedora 42 (EOL) as well. RHEL is not affected (pam 1.5.1/1.6.1 lack the affected code path).