CVSS 3.1
6.8 mediumCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:NMedium (6.8). EPSS 1.1% estimated probability of exploitation activity in the next 30 days.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:NExplain CVE-2021-20316 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-20316?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-20316?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-20316 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| samba:samba | before 4.15.0 |
| debian:debian_linux | 10.0 |
| debian:debian_linux | 11.0 |
| redhat:virtualization_host | 4.0 |
| redhat:enterprise_linux | 8.0 |
| redhat:enterprise_linux_aus | 8.6 |
| redhat:enterprise_linux_eus | 8.6 |
| redhat:enterprise_linux_tus | 8.6 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 12, 13, 14 | samba | 2:4.16.0+dfsg-2 | DEBIAN-CVE-2021-20316 |
| Ubuntu | 22.04:LTS, Pro:14.04:LTS, Pro:16.04:LTS and 2 more | samba | no fix listed | UBUNTU-CVE-2021-20316 |
| Red Hat | enterprise_linux:8::appstream | ctdb-debuginfo, samba-debuginfo, samba-debugsource and 18 more | 0:4.15.5-5.el8 | RHSA-2022:2074 |
| Red Hat | enterprise_linux:8::baseos | ctdb, samba, samba-libs and 38 more | 0:4.15.5-5.el8 | RHSA-2022:2074 |
| Red Hat | enterprise_linux:8::crb | samba-devel, ctdb-debuginfo, samba-debuginfo and 20 more | 0:4.15.5-5.el8 | RHSA-2022:2074 |
| Red Hat | storage:3.5:samba:el8 | ctdb, samba, samba-libs and 39 more | 0:4.15.5-100.el8rhgs | RHSA-2022:1756 |
| SUSE | Linux Enterprise High Availability Extension 12 SP5, Linux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5 and 1 more | samba | 4.15.4+git.324.8332acf1a63-3.54.1 | SUSE-SU-2022:0323-1 |
| SUSE | Linux Enterprise High Availability Extension 15 SP3, Linux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Python 2 15 SP3 | samba | 4.15.4+git.324.8332acf1a63-150300.3.25.3 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3 | ldb | 2.4.1-150300.3.10.1 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3 | libapparmor | 2.13.6-150300.3.11.1 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3 | sssd | 1.16.1-150300.23.17.3 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3 | talloc | 2.3.3-150300.3.3.2 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3 | tdb | 1.4.4-150300.3.3.2 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3 | tevent | 0.11.0-150300.3.3.2 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Server Applications 15 SP3 | apparmor | 2.13.6-150300.3.11.2 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Server Applications 15 SP3 | krb5 | 1.19.2-150300.8.3.2 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Module for Basesystem 15 SP3 | talloc-man | 2.3.3-150300.3.3.1 | SUSE-SU-2022:0283-1 |
| SUSE | Linux Enterprise Module for Basesystem 15 SP3 | tevent-man | 0.11.0-150300.3.3.1 | SUSE-SU-2022:0283-1 |
| 7 more for SUSE in the JSON and on SUSE's page. | ||||
| openSUSE | Leap 15.3 | apparmor | 2.13.6-150300.3.11.2 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | krb5, krb5-mini | 1.19.2-150300.8.3.2 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | ldb | 2.4.1-150300.3.10.1 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | libapparmor | 2.13.6-150300.3.11.1 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | samba | 4.15.4+git.324.8332acf1a63-150300.3.25.3 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | sssd | 1.16.1-150300.23.17.3 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | talloc | 2.3.3-150300.3.3.2 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | talloc-man | 2.3.3-150300.3.3.1 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | tdb | 1.4.4-150300.3.3.2 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | tevent | 0.11.0-150300.3.3.2 | openSUSE-SU-2022:0283-1 |
| openSUSE | Leap 15.3 | tevent-man | 0.11.0-150300.3.3.1 | openSUSE-SU-2022:0283-1 |
| AlmaLinux | 8 | ctdb, samba, samba-libs and 22 more | 4.15.5-5.el8 | ALSA-2022:2074 |
| AlmaLinux | 8 | libwbclient-devel | 4.15.5-8.el8_6 | ALSA-2022:2074 |
| Rocky Linux | 8 | samba | 0:4.15.5-5.el8 | RLSA-2022:2074 |
| Azure Linux | 2 | samba | no fix listed | AZL-10652 |
| Azure Linux | 3 | samba | 4.18.3-1 | AZL-37001 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.
Red Hat rates this Moderate.
As per upstream, "Prior to Samba 4.15.0, patches for this are not possible due to the prior design of the Samba VFS layer, which used pathname-based calls for most meta-data operations.
A two and a half year effort was undertaken to completely re-write the Samba VFS layer to stop the use of pathname-based calls in all cases involving reading and writing of metadata returned to the client. This work has finally been completed in Samba 4.15.0."
Do not enable SMB1 (please note SMB1 is disabled by default in Samba from version 4.11.0 and onwards). This prevents the creation of symbolic links via SMB1. If SMB1 must be enabled for backward compatibility then add the parameter:
unix extensions = no
to the [global] section of your smb.conf and restart smbd. This prevents SMB1 clients from creating symlinks on the exported file system.
However, if the same region of the file system is also exported using NFS, NFS clients can create symlinks that potentially can also hit the race condition. For non-patched versions of Samba, we recommend only exporting areas of the file system by either SMB2 or NFS, not both.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 8 | samba-0:4.15.5-5.el8 | Fixed 2022-05-10 | RHSA-2022:2074 |
| Red Hat Gluster Storage 3.5 for RHEL 8 | samba-0:4.15.5-100.el8rhgs | Fixed 2022-05-10 | RHSA-2022:1756 |
| Red Hat Enterprise Linux 6 | samba | Out of support scope | |
| Red Hat Enterprise Linux 6 | samba4 | Out of support scope | |
| Red Hat Enterprise Linux 7 | samba | Out of support scope | |
| Red Hat Enterprise Linux 9 | samba | Not affected |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-20316.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.