A Vulnerability in Samba Could Allow for Remote Code Execution

ITS Advisory Number: 
2017-052
Date(s) Issued: 
Thursday, May 25, 2017
Subject: 
A Vulnerability in Samba Could Allow for Remote Code Execution
Overview: 

A vulnerability has been discovered in Samba, which could allow for remote code execution. Samba is open source software that provides fast file and print services to SMB/CIFS clients. Successful exploitation of this vulnerability could allow an attacker to execute remote code in the context of the application. Depending on the privileges associated with the application, an attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Applications configured to have fewer user rights on the system could be less impacted than those that operate with administrative user rights.

Systems Affected: 
  • Samba version 3.5.0 through versions 4.4.13, 4.5.9 and 4.6.3

RISK
GOVERNMENT
Large and medium government entities: 
High
Small government entities: 
High
BUSINESS
Large and medium business entities: 
High
Small business entities: 
High
Home Users: 
High
Description: 

A vulnerability has been discovered in Samba, which could allow for remote code execution. This issue occurs because Samba fails to restrict the use of named pipes in file names. A pipe is used to send the output of a command as input to another command in Unix-based operating systems, and only lasts as long as it takes that process to run. A named pipe is a one-way or duplex pipe that lasts for as long as the system is up and appears as a file on the system. This issue allows for an attacker to upload a file to the Samba server using a named pipe in the file name, which causes the server to load and execute the file.

Successful exploitation of this vulnerability could allow an attacker to execute remote code in the context of the application. Depending on the privileges associated with the application, an attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Applications configured to have fewer user rights on the system could be less impacted than those that operate with administrative user rights.

Actions: 
  • After appropriate testing, immediately apply applicable patches or workarounds provided by Samba to vulnerable systems.

  • Run all software as a non-privileged user (one without administrative privileges) to diminish the effects of a successful attack.

  • Remind users not to visit un-trusted websites or follow links provided by unknown or un-trusted sources.

  • Inform and educate users regarding the threats posed by hypertext links contained in emails or attachments especially from un-trusted sources.

  • Apply the Principle of Least Privilege to all systems and services.