Bug 1126010 (CVE-2014-3560) - CVE-2014-3560 samba: remote code execution in nmbd
Summary: CVE-2014-3560 samba: remote code execution in nmbd
Status: CLOSED ERRATA
Alias: CVE-2014-3560
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=important,public=20140731,repo...
Keywords: Security
Depends On: 1126011 1126012 1126013 1126014 1126015 1126022 1126023
Blocks: 1126016
TreeView+ depends on / blocked
 
Reported: 2014-08-01 15:16 UTC by Vincent Danen
Modified: 2019-06-08 20:08 UTC (History)
17 users (show)

(edit)
A heap-based buffer overflow flaw was found in Samba's NetBIOS message block daemon (nmbd). An attacker on the local network could use this flaw to send specially crafted packets that, when processed by nmbd, could possibly lead to arbitrary code execution with root privileges.
Clone Of:
(edit)
Last Closed: 2014-08-05 20:13:14 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1008 normal SHIPPED_LIVE Important: samba security and bug fix update 2014-08-06 00:01:00 UTC
Red Hat Product Errata RHSA-2014:1009 normal SHIPPED_LIVE Important: samba4 security update 2014-08-05 22:58:04 UTC

Description Vincent Danen 2014-08-01 15:16:57 UTC
As reported in the upstream advisory and bugzilla [1]:

All current versions of Samba 4.x.x are vulnerable to a remote code execution vulnerability in the nmbd NetBIOS name services daemon.

A malicious browser can send packets that may overwrite the heap of the target nmbd NetBIOS name services daemon. It may be possible to use this to generate a remote code execution vulnerability as the superuser (root).

Patches are available for 4.1.x [2] and 4.0.x [3].

[1] https://bugzilla.samba.org/show_bug.cgi?id=10735
[2] https://git.samba.org/?p=samba.git;a=commitdiff;h=e6a848630da3ba958c442438ea131c99fa088605
[3] https://git.samba.org/?p=samba.git;a=commitdiff;h=fb1d325d96dfe9bc2e9c4ec46ad4c55e8f18f4a2


External References:

https://www.samba.org/samba/security/CVE-2014-3560


Statement:

This issue did not affect the versions of samba or samba3x as shipped with Red Hat Enterprise Linux 5, and the versions of samba as shipped with Red Hat Enterprise Linux 6, as it only affected Samba 4.0.0 and higher.

Comment 3 Vincent Danen 2014-08-01 15:18:29 UTC
Created samba tracking bugs for this issue:

Affects: fedora-all [bug 1126015]

Comment 5 Josh Bressers 2014-08-01 17:10:33 UTC
We are rating this issue as Important.

To exploit this issue the following conditions must be met:
nmbd must be running on the target host and listening to the network.
An attacker must have local network access.
An attacker must be able to run a fake SMB master on the network.

If a host is running nmbd on the public internet, this cannot be exploited by network traffic from a different subnet.

Comment 6 Tomas Hoger 2014-08-04 06:12:41 UTC
This issue was introduced via the following upstream commit:

https://git.samba.org/?p=samba.git;a=commitdiff;h=d25370fb477dd733fae6c1ee1a67e32a78236779

Comment 7 Tomas Hoger 2014-08-04 07:39:49 UTC
Note that the commit linked in comment 6 introduced the same bug in both unstrcpy() and nstrcpy() macros.  Only unstrcpy() was corrected by patches linked in comment 0.  The nstrcpy() bug has not security impact, as that macro is not used anywhere in the Samba source code.

Comment 8 Tomas Hoger 2014-08-04 11:14:42 UTC
(In reply to Tomas Hoger from comment #7)
> Note that the commit linked in comment 6 introduced the same bug in both
> unstrcpy() and nstrcpy() macros.  Only unstrcpy() was corrected by patches
> linked in comment 0.  The nstrcpy() bug has not security impact, as that
> macro is not used anywhere in the Samba source code.

nstrcpy() was removed upstream via:

https://git.samba.org/?p=samba.git;a=commitdiff;h=fb9d8c402614556d7a36f9e9efb72b3f4afe838a

Comment 9 Martin Prpič 2014-08-05 08:42:27 UTC
IssueDescription:

A heap-based buffer overflow flaw was found in Samba's NetBIOS message block daemon (nmbd). An attacker on the local network could use this flaw to send specially crafted packets that, when processed by nmbd, could possibly lead to arbitrary code execution with root privileges.

Comment 10 errata-xmlrpc 2014-08-05 18:58:19 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2014:1009 https://rhn.redhat.com/errata/RHSA-2014-1009.html

Comment 11 errata-xmlrpc 2014-08-05 20:01:23 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 7

Via RHSA-2014:1008 https://rhn.redhat.com/errata/RHSA-2014-1008.html


Note You need to log in before you can comment on or make changes to this bug.