FedoraOperating system · Fedoraproject

CVE-2021-20254

MEDIUM · 6.8 CVSS v3.1 Published 2021-05-05
Fix available
A fix is available. Upgrade to 4.12.15 / 4.13.8 or later.
See remediation →
74/100
Remediation priority · Elevated
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
A flaw was found in samba. The Samba smbd file server must map Windows group identities (SIDs) into unix group ids (gids). The code that performs this had a flaw that could allow it to read data beyond the end of the array in the case where a negative cache entry had been added to the mapping cache. This could cause the calling code to return those values into the process token that stores the group membership for a user. The highest threat from this vulnerability is to data confidentiality and integrity.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A buffer over-read vulnerability exists in Samba's smbd file server where the code that maps Windows SIDs to Unix GIDs can read beyond array bounds when negative cache entries exist in the mapping cache. This causes incorrect group membership data to be returned in the user process token, potentially exposing unauthorized group associations.

MitigationUpdate Samba to the patched version that addresses this out-of-bounds read in the SID-to-gid mapping cache. Verify group membership mappings function correctly after the update.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
FedoraOperating system
Affected:= 32= 33
Enterprise LinuxOperating system
Affected:= 7.0= 8.0
Debian LinuxOperating system
Affected:= 9.0
SambaApplication
Affected:>= 3.6.0, < 4.12.15>= 4.13.0, < 4.13.8>= 4.14.0, < 4.14.4

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
High
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check if Samba smbd is running
    Run command: ps aux | grep smbd | grep -v grep. Also check if winbind service is active: systemctl status winbind or ps aux | grep winbind
    Affected if smbd or winbind services are running - these are the components that contain the vulnerable SID-to-GID mapping code
  2. Determine installed Samba version
    Run: smbstatus --version or rpm -q samba or dpkg -l samba (depending on distribution). Compare output to affected ranges: < 4.12.15, >= 4.13.0 to < 4.13.8, >= 4.14.0 to < 4.14.4
    Affected if Installed version falls within any of the affected ranges (>= 3.6.0 to < 4.12.15, >= 4.13.0 to < 4.13.8, or >= 4.14.0 to < 4.14.4)
  3. Check if Samba is configured for domain/Active Directory integration
    Examine /etc/samba/smb.conf for 'idmap config' directives or 'winbind' settings. Look for lines containing 'idmap' or 'winbind'. Also check if /etc/nsswitch.conf includes 'winbind' for passwd/group
    Affected if Samba is configured to use winbind for user/group mapping (idmap or winbind directives present in config) - this enables the vulnerable SID-to-GID mapping code path
  4. Verify if negative cache entries could exist in the SID mapping cache
    Check for cache files in /var/cache/samba/ or /tmp/ related to winbind. On some systems, examine: ls -la /var/lib/samba/*.tdb or ls -la /var/cache/samba/*.tdb
    Affected if Samba/winbind has been actively used for SID-to-UID/GID mapping, creating cache entries that could include negative cache entries triggering the over-read
  5. Review group membership mappings for anomalies
    Run: wbinfo --group-info=<groupname> for various groups, or use 'getent group' to list all groups. Compare results against expected Unix group memberships
    Affected if Group membership returns differ from expected or show unexpected group associations - indicating potential exploitation of the over-read affecting group token data

You are affected if Samba smbd/winbind is running with a version in the affected ranges AND Samba is configured for SID-to-GID mapping (winbind or idmap config), especially if group membership results appear incorrect.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Upgrade available Upgrade to 4.12.15 / 4.13.8 / 4.14.4 or later
Fixed in 4.12.154.13.84.14.4
Interim mitigation

Update Samba to the patched version that addresses this out-of-bounds read in the SID-to-gid mapping cache. Verify group membership mappings function correctly after the update.

Fix this in Fedora Scoped from the published advisory
  • Consultation2.0 h
  • Implementation3.0 h
  • Testing6.0 h
  • Review / QA2.0 h
13.0 hours of engineering $2,200
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,520.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-20254 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-20254 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data