CWE
362
Advisory Published
CVE Published
CVE Published
Updated

CVE-2021-20316: Race Condition

First published: Fri Oct 01 2021(Updated: )

A flaw was found in the way Samba handled file/directory metadata. This flaw allows an authenticated attacker with permissions to read or modify share metadata, to perform this operation outside of the share.

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
Samba Samba<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
redhat/samba<0:4.15.5-5.el8
0:4.15.5-5.el8
redhat/samba<0:4.15.5-100.el8
0:4.15.5-100.el8
redhat/samba<4.15.0
4.15.0
debian/samba<=2:4.13.13+dfsg-1~deb11u6
2:4.17.12+dfsg-0+deb12u1
2:4.21.0~rc1+really4.20.3+dfsg-1
2:4.21.0~rc1+really4.20.4+dfsg-1

Remedy

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.

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • What is CVE-2021-20316?

    CVE-2021-20316 is a vulnerability in Samba that allows an authenticated attacker to perform operations outside of a shared directory.

  • How severe is CVE-2021-20316?

    CVE-2021-20316 has a severity score of 6.8, which is considered medium.

  • Which software is affected by CVE-2021-20316?

    Samba versions up to 4.15.0, Debian Linux 10.0 and 11.0, Redhat Virtualization Host 4.0, Redhat Enterprise Linux 8.0, 8.6, and samba package versions up to 2:4.13.13+dfsg-1~deb11u5 are affected by CVE-2021-20316.

  • How can I fix CVE-2021-20316?

    To fix CVE-2021-20316, update to Samba version 4.15.0 or later, Debian Linux 10.0 or 11.0, Redhat Virtualization Host 4.0, or Redhat Enterprise Linux 8.0 or 8.6, and update the samba package to 2:4.17.9+dfsg-0+deb12u3, 2:4.17.10+dfsg-0+deb12u1, or 2:4.19.0+dfsg-1.

  • Where can I find more information about CVE-2021-20316?

    You can find more information about CVE-2021-20316 on the Red Hat Security Advisory and Samba bugzilla pages: https://access.redhat.com/security/cve/CVE-2021-20316, https://bugzilla.redhat.com/show_bug.cgi?id=2009673, https://bugzilla.samba.org/show_bug.cgi?id=14842.

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.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203