CVE-2023-4091: Samba: smb clients can truncate files with read-only permissions

Published Oct 3, 2023
·
Updated

A vulnerability was discovered in Samba, where the flaw allows SMB clients to truncate files, even with read-only permissions when the Samba VFS module "aclxattr" is configured with "aclxattr:ignore system acls = yes". The SMB protocol allows opening files when the client requests read-only access but then implicitly truncates the opened file to 0 bytes if the client specifies a separate OVERWRITE create disposition request. The issue arises in configurations that bypass kernel file system permissions checks, relying solely on Samba's permissions.

Other sources

SMB client can truncate files to 0 bytes by opening files with OVERWRITE disposition when using the aclxattr Samba VFS module with the smb.conf setting "aclxattr:ignore system acls = yes".

If the module configuration parameter "aclxattr:ignore system acls=no", then the Samba server is not vulnerable to this attack.

https://bugzilla.samba.org/showbug.cgi?id=15439

— Red Hat

Affected Software

19 affected componentsFixes available
ubuntu/samba<2:4.15.13+dfsg-0ubuntu0.20.04.6
2:4.15.13+dfsg-0ubuntu0.20.04.6
ubuntu/samba<2:4.15.13+dfsg-0ubuntu1.5
2:4.15.13+dfsg-0ubuntu1.5
ubuntu/samba<2:4.17.7+dfsg-1ubuntu2.3
2:4.17.7+dfsg-1ubuntu2.3
ubuntu/samba<2:4.18.6+dfsg-1ubuntu2.1
2:4.18.6+dfsg-1ubuntu2.1
ubuntu/samba<2:4.18.6+dfsg-1ubuntu2.1
2:4.18.6+dfsg-1ubuntu2.1
redhat/samba<4.19.1
4.19.1
redhat/samba<4.18.8
4.18.8
redhat/samba<4.17.12
4.17.12
Samba Samba<4.17.12
Samba Samba>=4.18.0<4.18.8
Samba Samba>=4.19.0<4.19.1
Fedoraproject Fedora=39
redhat Storage=3.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux Eus=9.0
debian/samba<2:4.17.12+dfsg-0+deb12u1
2:4.17.12+dfsg-0+deb12u1
debian/samba<2:4.19.1+dfsg-1
2:4.19.1+dfsg-1
debian/samba<2:4.19.1+dfsg-1
2:4.19.1+dfsg-1
debian/samba
2:4.9.5+dfsg-5+deb10u52:4.13.13+dfsg-1~deb11u62:4.17.12+dfsg-0+deb12u12:4.19.1+dfsg-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/samba to a version that resolves this vulnerability.

    Fixed in 2:4.15.13+dfsg-0ubuntu0.20.04.6
  2. Upgrade

    Upgrade ubuntu/samba to a version that resolves this vulnerability.

    Fixed in 2:4.15.13+dfsg-0ubuntu1.5
  3. Upgrade

    Upgrade ubuntu/samba to a version that resolves this vulnerability.

    Fixed in 2:4.17.7+dfsg-1ubuntu2.3
  4. Upgrade

    Upgrade ubuntu/samba to a version that resolves this vulnerability.

    Fixed in 2:4.18.6+dfsg-1ubuntu2.1
  5. Upgrade

    Upgrade redhat/samba to a version that resolves this vulnerability.

    Fixed in 4.19.1
  6. Upgrade

    Upgrade redhat/samba to a version that resolves this vulnerability.

    Fixed in 4.18.8
  7. Upgrade

    Upgrade redhat/samba to a version that resolves this vulnerability.

    Fixed in 4.17.12
  8. Upgrade

    Upgrade debian/samba to a version that resolves this vulnerability.

    Fixed in 2:4.17.12+dfsg-0+deb12u1
  9. Upgrade

    Upgrade debian/samba to a version that resolves this vulnerability.

    Fixed in 2:4.19.1+dfsg-1
  10. Upgrade

    Upgrade debian/samba to a version that resolves this vulnerability.

    Fixed in 2:4.9.5+dfsg-5+deb10u5Fixed in 2:4.13.13+dfsg-1~deb11u6Fixed in 2:4.17.12+dfsg-0+deb12u1Fixed in 2:4.19.1+dfsg-1
  11. Configuration

    Set acl_xattr:ignore system acls = no in smb.conf to prevent the vulnerability; configurations using yes are vulnerable.

    Samba VFS module acl_xattr acl_xattr:ignore system acls = no

Event History

Oct 3, 2023
Data Sourced
07:34 AM
DescriptionSeverityAffected Software
Oct 10, 2023
CVE Published
12:00 AM
Data Sourced
12:00 AM
Remedy
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
Affected Software
Nov 3, 2023
CVE Published
via MITRE·07:56 AM
Data Sourced
07:56 AM
Weakness
Data Sourced
via OSV·07:56 AM
DescriptionSeverityWeakness
Nov 13, 2023
Updated
05:52 PM
SeverityWeakness
Nov 21, 2023
Updated
06:15 PM
Affected Software
Nov 22, 2023
Data Sourced
via Red Hat·05:29 PM
DescriptionSeverityAffected Software
Nov 24, 2023
Updated
09:15 AM
Affected Software
Jan 23, 2024
Data Sourced
via MITRE·01:29 AM
DescriptionSeverityWeakness
Apr 22, 2024
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeaknessAffected Software
Updated
via NVD·04:15 PM
Affected Software
Sep 16, 2024
Updated
via NVD·03:15 PM
Affected Software
Nov 21, 2024
Updated
via NVD·08:34 AM
Affected Software
Jun 17, 2026
Updated
via NVD·06:37 AM
Affected Software
Oct 26, 2026
Data Sourced
via OSV·06:02 PM
Affected Software
Nov 7, 2026
Updated
via NVD·02:16 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is CVE-2023-4091?

CVE-2023-4091 is a vulnerability that allows SMB clients to truncate files with read-only permissions.

2

How does CVE-2023-4091 impact SMB clients?

CVE-2023-4091 allows SMB clients to truncate files even if they only have read-only permissions.

3

Which software is affected by CVE-2023-4091?

Samba versions up to 2:4.15.13+dfsg-0ubuntu0.20.04.6, 2:4.15.13+dfsg-0ubuntu1.5, and 2:4.17.7+dfsg-1ubuntu2.3 are affected by CVE-2023-4091.

4

How can I fix CVE-2023-4091?

To fix CVE-2023-4091, update Samba to version 2:4.15.13+dfsg-0ubuntu0.20.04.6, 2:4.15.13+dfsg-0ubuntu1.5, or 2:4.17.7+dfsg-1ubuntu2.3 depending on your Ubuntu release.

5

Where can I find more information about CVE-2023-4091?

You can find more information about CVE-2023-4091 on the MITRE CVE website (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-4091), the Samba security page (https://www.samba.org/samba/security/CVE-2023-4091.html), and the Ubuntu security notices (https://ubuntu.com/security/notices/USN-6425-1).

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