Bug 1478016

Summary: samba: SMBLoris DoS attack on SMB service
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED CANTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abokovoy, anoopcs, asn, cperry, gdeschner, huzaifas, jarrpa, lists, lmohanty, madam, nobody, rcyriac, rhel-process-autobot, rhs-smb, sardella, sbose, sisharma, smohan, ssaha, ssorce, vbellur, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-01 10:26:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1478017, 1478341, 1478471, 1478472, 1478473, 1478474, 1478475, 1478476, 1478567    
Bug Blocks: 1478023    

Description Adam Mariš 2017-08-03 13:06:57 UTC
Samba is vulnerable to SMBLoris vulnerability affecting SMB service causing userspace OOM on Linux.

Reference:

http://seclists.org/fulldisclosure/2017/Aug/2

Reproducer:

https://gist.github.com/marcan/6a2d14b0e3eaa5de1795a763fb58641e

Comment 1 Adam Mariš 2017-08-03 13:07:37 UTC
Created samba tracking bugs for this issue:

Affects: fedora-all [bug 1478017]

Comment 2 Andreas Schneider 2017-08-03 16:15:57 UTC
max smbd processes (G)

    This parameter limits the maximum number of smbd(8) processes concurrently
    running on a system and is intended as a stopgap to prevent degrading
    service to clients in the event that the server has insufficient resources
    to handle more than this number of connections. Remember that under normal
    operating conditions, each user will have an smbd(8) associated with him or
    her to handle connections to all shares from a given host.

        Default: max smbd processes = 0

        Example: max smbd processes = 1000

Comment 3 Siddharth Sharma 2017-08-04 08:32:05 UTC
Mitigation:

1. use 'max smb processes = <max number of processes allowed>' in /etc/samba/smb.conf to limit maximum number of smbd processes.

2. Limit the exposure of TCP port 445 to internet.

Comment 11 Huzaifa S. Sidhpurwala 2017-08-08 15:38:56 UTC
External Reference:

https://access.redhat.com/security/vulnerabilities/smbloris

Comment 12 Huzaifa S. Sidhpurwala 2017-09-01 10:22:23 UTC
Statement:

There is currently no upstream patch for this issue. The Red Hat Product Security Team advises customer to use the "Mitigation" provided, to resolve this security flaw. We shall revisit this issue, when an appropriate upstream patch is available.