CVE-2021-44142: High severity Samba Samba vulnerability
As per samba upstream advisory:
All versions of Samba prior to 4.13.17 are vulnerable to an out-of-bounds heap read write vulnerability that allows remote attackers to execute arbitrary code as root on affected Samba installations that use the VFS module vfsfruit.
The specific flaw exists within the parsing of EA metadata when opening files in smbd. Access as a user that has write access to a file's extended attributes is required to exploit this vulnerability. Note that this could be a guest or unauthenticated user if such users are allowed write access to file extended attributes.
The problem in vfsfruit exists in the default configuration of the fruit VFS module using fruit:metadata=netatalk or fruit:resource=file. If both options are set to different settings than the default values, the system is not affected by the security issue.
Other sources
The Samba vfsfruit module uses extended file attributes (EA, xattr) to provide "...enhanced compatibility with Apple SMB clients and interoperability with a Netatalk 3 AFP fileserver." Samba versions prior to 4.13.17, 4.14.12 and 4.15.5 with vfsfruit configured allow out-of-bounds heap read and write via specially crafted extended file attributes. A remote attacker with write access to extended file attributes can execute arbitrary code with the privileges of smbd, typically root.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/sambato a version that resolves this vulnerability.Fixed in 4.13.17-r0 - Upgrade
Upgrade
alpine/sambato a version that resolves this vulnerability.Fixed in 4.14.12-r0 - Upgrade
Upgrade
alpine/sambato a version that resolves this vulnerability.Fixed in 4.15.12-r0 - Upgrade
Upgrade
redhat/sambato a version that resolves this vulnerability.Fixed in 4.13.17 - Upgrade
Upgrade
redhat/sambato a version that resolves this vulnerability.Fixed in 4.14.12 - Upgrade
Upgrade
redhat/sambato a version that resolves this vulnerability.Fixed in 4.15.4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.13.17 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.14.12 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.15.5 - Configuration
Set both fruit:metadata and fruit:resource to values different from their default values.
Samba vfs_fruit fruit:metadata and fruit:resource