REDHAT-BUG-2499991: Medium severity Samba samba-winbind (pam_winbind module) vulnerability

Published Jul 14, 2026
·
Updated

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

2 affected components
Samba samba-winbind (pam_winbind module)>=4.19.0<4.24.3
samba-winbind=4.23.x

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade RHEL 8.10.z to a version that resolves this vulnerability.

    Fixed in RHEL-178261Patch RHBA-2026:169544
  2. Upgrade

    Upgrade RHEL 9.8.z to a version that resolves this vulnerability.

    Fixed in RHEL-180756Patch RHBA-2026:168497
  3. Upgrade

    Upgrade RHEL 10.2.z to a version that resolves this vulnerability.

    Fixed in RHEL-180758Patch RHBA-2026:168496
  4. 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

Jul 14, 2026
Data Sourced
via Red Hat·02:19 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2499991?

The severity of REDHAT-BUG-2499991 is medium, rated at 4.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203