Overview
Recently, NSFOCUS CERT detected a Samba remote code execution vulnerability (CVE-2021-44142) disclosed online. Because the default configuration of Samba’s vfs_fruit module allows out-of-bounds heap read and write through extended file attributes. When smbd parses EA metadata, a remote attacker (guest account or unauthorized user) with write access to the file’s extended attributes can execute arbitrary code with smbd’s privileges (usually root). At present, an analysis article of this vulnerability has been published, and relevant users are requested to take measures to protect it as soon as possible.
Samba is a free software that implements the SMB protocol on Linux and UNIX systems, and consists of server and client programs. The fruit modules that ship with Samba are designed to provide interoperability between Samba and Netatalk.
Reference link: https://www.samba.org/samba/security/CVE-2021-44142.html
Scope of Impact
Affected version
- Samba < 4.13.17
- Samba < 4.14.12
- Samba < 4.15.5
Unaffected version
- Samba = 4.13.17
- Samba = 4.14.12
- Samba = 4.15.5
Mitigation
Official update
At present, Samba has released a new version to fix this vulnerability. It is recommended that affected users update it in time for protection. Official download link: https://www.samba.org/samba/history/security.html
Temporary mitigation
If the relevant users are temporarily unable to perform the upgrade operation, the following measures can be used for temporary relief:
Remove the “fruit” VFS module from “vfs objects” in the Samba configuration file smb.conf.
Note: Changing the VFS module setting fruit:metadata or fruit:resource may cause all storage information to become inaccessible, such as the loss of information that makes it visible to macOS users.
Statement
This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.
About NSFOCUS
NSFOCUS, Inc., a global network and cyber security leader, protects enterprises and carriers from advanced cyber attacks. The company’s Intelligent Hybrid Security strategy utilizes both cloud and on-premises security platforms, built on a foundation of real-time global threat intelligence, to provide multi-layered, unified and dynamic protection against advanced cyber attacks.
NSFOCUS works with Fortune Global 500 companies, including four of the world’s five largest financial institutions, organizations in insurance, retail, healthcare, critical infrastructure industries as well as government agencies. NSFOCUS has technology and channel partners in more than 60 countries, is a member of both the Microsoft Active Protections Program (MAPP), and the Cloud Security Alliance (CSA). A wholly owned subsidiary of NSFOCUS Technologies Group Co., Ltd., the company has operations in the Americas, Europe, the Middle East and Asia Pacific.