A security researcher from DEVCORE, Orange Tsai disclosed a critical out-of-bounds write vulnerability in Samba vfs_fruit module along with a medium and low vulnerability. The out-of-bound read/write vulnerability is tracked under CVE-2021-44142 has a base score of 9.9 out of 10. The successful exploitation of the flaw allows remote attackers to execute arbitrary code on the affected machine with the highest root privileges. Since Samba is one of the most common services being used in multiple platforms, we can say that millions of servers are vulnerable to the flaw. It is important to learn how to fix the CVE-2021-44142 vulnerability in Samba. So, let’s see How to Fix the Out-of-Bounds Write Vulnerability In Samba vfs_fruit module (CVE-2021-44142) along with the other two CVE-2021-44141 and CVE-2022-0336 vulnerabilities in this post.
As the front page at samba.org says: Samba is a software package that gives network administrators flexibility and freedom in terms of setup, configuration, and choice of systems and equipment.
Samba is free software used to implement the Server Message Block (SMB) protocol. It’s used to share files over the network. It is also referred to as the Common Internet File System, in short, CIFS. If you ask what platforms support this protocol. The answer is pretty much all. It supports Windows, Linux, and Mac. We have shown how to build a personal cross-platform file-sharing server using Samba on a small computer like Raspberry Pi in a different post.
A simple explanation for this is if a service or a program writes data outside of the boundaries of the buffer. That could be either the beginning or after the end of the allocated buffer.
This could lead to many negative implications, which may include:
Data corruption
Crash of service or the program
Arbitrary code execution vulnerability
There are other three vulnerabilities that Samba addressed:
CVE-2021-44141
CVE-2021-44142
CVE-2022-0336
The out-of-bound heap read/write vulnerability actually lice in the Samba vfs_fruit module, which provides enhanced compatibility with Apple SMB clients and interoperability with a Netatalk 3 AFP fileserver. Attackers can exploit the vulnerability using a specially crafted extended file attribute.
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 vfs_fruit.
Associated CVE ID | CVE-2021-44142 |
Description | Out-of-bounds heap read/write vulnerability in Samba’S VFS module |
Associated ZDI ID | – |
CVSS Score | 9.9 Critical |
Vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:F/RL:O/RC:C |
Impact Score | – |
Exploitability Score | – |
Attack Vector (AV) | Network |
Attack Complexity (AC) | Low |
Privilege Required (PR) | Low |
User Interaction (UI) | None |
Scope | Changed |
Confidentiality (C) | High |
Integrity (I) | High |
availability (a) | High |
Associated CVE ID | CVE-2021-44141 |
Description | Information leak via symlinks of existance of files or directories outside of the exported share |
Associated ZDI ID | – |
CVSS Score | 4.2 Medium |
Vector | CVSS:AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:P/RL:O/RC:C/CR:L/IR:L/AR:L/MAV:N/MAC:L/MPR:L/MUI:N/MS:U/MC:H/MI:N/MA:N |
Impact Score | – |
Exploitability Score | – |
Attack Vector (AV) | Network |
Attack Complexity (AC) | Low |
Privilege Required (PR) | Low |
User Interaction (UI) | None |
Scope | Unchanged |
Confidentiality (C) | High |
Integrity (I) | None |
availability (a) | None |
Associated CVE ID | CVE-2022-0336 |
Description | Samba AD users with permission to write to an account can impersonate arbitrary services. |
Associated ZDI ID | – |
CVSS Score | 3.1 Low |
Vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Impact Score | – |
Exploitability Score | – |
Attack Vector (AV) | Network |
Attack Complexity (AC) | Low |
Privilege Required (PR) | Low |
User Interaction (UI) | None |
Scope | Changed |
Confidentiality (C) | High |
Integrity (I) | High |
availability (a) | High |
his table helps you learn versions affected by the respective vulnerabilities.
Vulnerability | Severity | Affected Samba Versions |
CVE-2021-44141 | 9.9 Critical | Versions Prior to 4.15.5 |
CVE-2021-44142 | 4.2 Medium | Versions Prior to 4.13.17 |
CVE-2022-0336 | 3.1 Low | Versions 4.0.0 and Later |
The most popular Linux distributions RedHat, SUSE, and Ubuntu are affected by the vulnerabilities. All the Distributors have released security updates to fix the vulnerabilities. Please visit their website for more information.
Samba has fixed all three vulnerabilities in their latest versions 4.13.17, 4.14.12, and 4.15.5. Samba users are urged to update to the recommended versions to fix the vulnerabilities.
However, there is a workaround for those who can’t immoderately apply the patch. You just need to remove ‘fruit’ VFS module from the list of configured VFS objects in any “vfs objects” line in the Samba configuration smb.conf.
Please visit the respective Linux distribution website or contact support.
$ sudo smbstatus
OR
$ sudo smbd -V
OR
$ sudo smbd –version
Use this PPA repo to upgrade or install Samba on Ubuntu Linux.
$ sudo add-apt-repository ppa:linux-schools/samba-latest
$ sudo apt-get update
$ sudo apt install samba
OR
$ sudo apt install samba
$ sudo smbstatus
OR
$ sudo smbd -V
OR
$ sudo smbd –version
We hope this post helps you know How to Fix the Out-of-Bounds Write Vulnerability In Samba vfs_fruit Module (CVE-2021-44142) along with the other two CVE-2021-44141 and CVE-2022-0336 vulnerabilities in Linus machines. Thanks for reading this threat post. Please share this post and help to secure the digital world. Visit our social media page on Facebook, LinkedIn, Twitter, Telegram, Tumblr, & Medium and subscribe to receive updates like this.
You may also like these articles:
Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.
“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”
"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.
BurpGPT is a cutting-edge Burp Suite extension that harnesses the power of OpenAI's language models to revolutionize web application security testing. With customizable prompts and advanced AI capabilities, BurpGPT enables security professionals to uncover bespoke vulnerabilities, streamline assessments, and stay ahead of evolving threats.
PentestGPT, developed by Gelei Deng and team, revolutionizes penetration testing by harnessing AI power. Leveraging OpenAI's GPT-4, it automates and streamlines the process, making it efficient and accessible. With advanced features and interactive guidance, PentestGPT empowers testers to identify vulnerabilities effectively, representing a significant leap in cybersecurity.
Tenable BurpGPT is a powerful Burp Suite extension that leverages OpenAI's advanced language models to analyze HTTP traffic and identify potential security risks. By automating vulnerability detection and providing AI-generated insights, BurpGPT dramatically reduces manual testing efforts for security researchers, developers, and pentesters.
Microsoft Security Copilot is a revolutionary AI-powered security solution that empowers cybersecurity professionals to identify and address potential breaches effectively. By harnessing advanced technologies like OpenAI's GPT-4 and Microsoft's extensive threat intelligence, Security Copilot streamlines threat detection and response, enabling defenders to operate at machine speed and scale.