REDHAT-BUG-2499991: Medium severity Samba samba-winbind (pam_winbind module) vulnerability
A flaw was found in samba's pamwinbind module. When pamwinbind.conf sets mkhomedir = yes, the module's pammkhomedir()/pamchownhomedir() functions call chown() on the target account's home directory (pwdir, taken directly from getpwnam()) without validating that the path is not a sensitive system directory. On RHEL, several stock system accounts (e.g. nobody, sssd, nscd) ship with / as their home directory by default in /etc/passwd. Opening a PAM session for such an account causes the root filesystem (/) to be chown'd to that account's uid/gid, breaking ownership checks relied on by sshd (StrictModes), sudo, and package tooling. Reproduced directly in an isolated sandbox using the exact affected NVRs: the trigger is not limited to root explicitly running su - nobody (the originally reported PoC) -- a non-root user holding only a narrow, common sudo delegation (e.g. 'someuser ALL=(nobody) NOPASSWD: ...') reaches the identical code path via the shared system-auth PAM stack included by sudo. Also confirmed: / ships with mode 0555 on RHEL, so the resulting ownership change does not grant the new owner write access to / (no arbitrary file creation/rename/deletion capability is gained); impact is denial of service via broken ownership checks, not privilege escalation via filesystem write access. Per the reporting bug (RHEL-178261), this was discovered during a customer penetration test (SFDC case 04452638). This flaw affects samba versions using the older pamchownhomedir() structure (samba 4.19.x/4.23.x, confirmed via source diff and live reproduction). A fix is gated and confirmed queued for RHEL 8.10.z (RHEL-178261, via RHBA-2026:169544, publishing 2026-07-28), RHEL 9.8.z (RHEL-180756, via RHBA-2026:168497, publishing 2026-08-04), and RHEL 10.2.z (RHEL-180758, via RHBA-2026:168496, publishing 2026-08-04) -- all three are non-security bug-fix errata. RHEL 9.9 and RHEL 10.3 ship samba 4.24.3, which refactored the affected code path upstream (chown() only fires when mkdir() creates a genuinely new directory, not when the target already exists) -- confirmed via live reproduction in isolated sandboxes using the exact NVRs those releases ship (samba-winbind-4.24.3-1.el9 and samba-winbind-4.24.3-100.el10) that neither su nor sudo-delegation triggers the chown. RHEL 9.9/10.3 are NOT AFFECTED.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
RHEL 8.10.zto a version that resolves this vulnerability.Fixed in RHEL-178261Patch RHBA-2026:169544 - Upgrade
Upgrade
RHEL 9.8.zto a version that resolves this vulnerability.Fixed in RHEL-180756Patch RHBA-2026:168497 - Upgrade
Upgrade
RHEL 10.2.zto a version that resolves this vulnerability.Fixed in RHEL-180758Patch RHBA-2026:168496 - Configuration
In /etc/security/pam_winbind.conf (or the configured pam_winbind.conf used by PAM), set mkhomedir to "no" so pam_winbind does not create/chown the target account's home directory via _pam_mkhomedir()/_pam_chown_homedir().
samba pam_winbind (pam_winbind.conf) mkhomedir = no
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2499991?
The severity of REDHAT-BUG-2499991 is medium, rated at 4.
What vulnerability does REDHAT-BUG-2499991 describe?
REDHAT-BUG-2499991 describes a flaw in samba's pam_winbind module that may improperly handle home directory permissions.
How do I fix REDHAT-BUG-2499991?
To fix REDHAT-BUG-2499991, ensure that pam_winbind is properly configured to avoid setting mkhomedir to yes for sensitive paths.
What impact does REDHAT-BUG-2499991 have on my system?
The impact of REDHAT-BUG-2499991 could allow unauthorized changes to sensitive directory permissions, potentially compromising security.
Is the flaw in REDHAT-BUG-2499991 specific to a certain version of samba?
Yes, REDHAT-BUG-2499991 affects the samba-winbind module in specific versions of Samba, so version checks are recommended.