The branch, v4-5-test has been updated via 8376a89 VERSION: Bump version up to 4.5.16. via 829fa02 Merge tag 'samba-4.5.15' into v4-5-test via f333815 VERSION: Disable GIT_SNAPSHOT for the 4.5.15 release. via d7526d6 WHATSNEW: Add release notes for Samba 4.5.15. via c1a22e5 s3: smbd: Chain code can return uninitialized memory when talloc buffer is grown. via 007f5b5 s3: smbd: Fix SMB1 use-after-free crash bug. CVE-2017-14746 via bd200ea python: use communicate to fix Popen deadlock via c28d922 blackbox tests: method to check specific exit codes via 21811ac VERSION: Bump version up to 4.5.15... from 3ad2444 python: use communicate to fix Popen deadlock
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test - Log ----------------------------------------------------------------- commit 8376a89e40b82c0b4b365b8daf155159f59945cb Author: Karolin Seeger <ksee...@samba.org> Date: Wed Nov 22 09:04:28 2017 +0100 VERSION: Bump version up to 4.5.16. Signed-off-by: Karolin Seeger <ksee...@samba.org> commit 829fa020f5f06b2d6496d37a064bccf166a3ecf9 Merge: 3ad2444 f333815 Author: Karolin Seeger <ksee...@samba.org> Date: Wed Nov 22 09:03:52 2017 +0100 Merge tag 'samba-4.5.15' into v4-5-test samba: tag release samba-4.5.15 ----------------------------------------------------------------------- Summary of changes: VERSION | 2 +- WHATSNEW.txt | 75 ++++++++++++++++++++++++++++++++++++++++++++++++-- source3/smbd/process.c | 7 +++-- source3/smbd/reply.c | 5 ++++ source3/smbd/srvstr.c | 14 ++++++++++ 5 files changed, 97 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/VERSION b/VERSION index e5753d2..2142867 100644 --- a/VERSION +++ b/VERSION @@ -25,7 +25,7 @@ ######################################################## SAMBA_VERSION_MAJOR=4 SAMBA_VERSION_MINOR=5 -SAMBA_VERSION_RELEASE=15 +SAMBA_VERSION_RELEASE=16 ######################################################## # If a official release has a serious bug # diff --git a/WHATSNEW.txt b/WHATSNEW.txt index ea845c3..b245e30 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,4 +1,75 @@ ============================== + Release Notes for Samba 4.5.15 + November 21, 2017 + ============================== + + +This is a security release in order to address the following defects: + +o CVE-2017-14746 (Use-after-free vulnerability.) +o CVE-2017-15275 (Server heap memory information leak.) + + +======= +Details +======= + +o CVE-2017-14746: + All versions of Samba from 4.0.0 onwards are vulnerable to a use after + free vulnerability, where a malicious SMB1 request can be used to + control the contents of heap memory via a deallocated heap pointer. It + is possible this may be used to compromise the SMB server. + +o CVE-2017-15275: + All versions of Samba from 3.6.0 onwards are vulnerable to a heap + memory information leak, where server allocated heap memory may be + returned to the client without being cleared. + + There is no known vulnerability associated with this error, but + uncleared heap memory may contain previously used data that may help + an attacker compromise the server via other methods. Uncleared heap + memory may potentially contain password hashes or other high-value + data. + +For more details and workarounds, please see the security advisories: + + o https://www.samba.org/samba/security/CVE-2017-14746.html + o https://www.samba.org/samba/security/CVE-2017-15275.html + + +Changes since 4.5.14: +--------------------- + +o Jeremy Allison <j...@samba.org> + * BUG 13041: CVE-2017-14746: s3: smbd: Fix SMB1 use-after-free crash bug. + * BUG 13077: CVE-2017-15275: s3: smbd: Chain code can return uninitialized + memory when talloc buffer is grown. + + +####################################### +Reporting bugs & Development Discussion +####################################### + +Please discuss this release on the samba-technical mailing list or by +joining the #samba-technical IRC channel on irc.freenode.net. + +If you do report problems then please try to send high quality +feedback. If you don't provide vital information to help us track down +the problem then you will probably be ignored. All bug reports should +be filed under the "Samba 4.1 and newer" product in the project's Bugzilla +database (https://bugzilla.samba.org/). + + +====================================================================== +== Our Code, Our Bugs, Our Responsibility. +== The Samba Team +====================================================================== + + +Release notes for older releases follow: +---------------------------------------- + + ============================== Release Notes for Samba 4.5.14 September 20, 2017 ============================== @@ -69,8 +140,8 @@ database (https://bugzilla.samba.org/). ====================================================================== -Release notes for older releases follow: ----------------------------------------- +---------------------------------------------------------------------- + ============================== Release Notes for Samba 4.5.13 diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 656f1c0..2641894 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1854,12 +1854,13 @@ void smb_request_done(struct smb_request *req) next->vuid = SVAL(req->outbuf, smb_uid); next->tid = SVAL(req->outbuf, smb_tid); - status = smb1srv_tcon_lookup(req->xconn, req->tid, + status = smb1srv_tcon_lookup(req->xconn, next->tid, now, &tcon); + if (NT_STATUS_IS_OK(status)) { - req->conn = tcon->compat; + next->conn = tcon->compat; } else { - req->conn = NULL; + next->conn = NULL; } next->chain_fsp = req->chain_fsp; next->inbuf = req->inbuf; diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index a40ff81..26918b6 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -921,6 +921,11 @@ void reply_tcon_and_X(struct smb_request *req) } TALLOC_FREE(tcon); + /* + * This tree id is gone. Make sure we can't re-use it + * by accident. + */ + req->tid = 0; } if ((passlen > MAX_PASS_LEN) || (passlen >= req->buflen)) { diff --git a/source3/smbd/srvstr.c b/source3/smbd/srvstr.c index 56dceba..c2d70b3 100644 --- a/source3/smbd/srvstr.c +++ b/source3/smbd/srvstr.c @@ -110,6 +110,20 @@ ssize_t message_push_string(uint8_t **outbuf, const char *str, int flags) DEBUG(0, ("srvstr_push failed\n")); return -1; } + + /* + * Ensure we clear out the extra data we have + * grown the buffer by, but not written to. + */ + if (buf_size + result < buf_size) { + return -1; + } + if (grow_size < result) { + return -1; + } + + memset(tmp + buf_size + result, '\0', grow_size - result); + set_message_bcc((char *)tmp, smb_buflen(tmp) + result); *outbuf = tmp; -- Samba Shared Repository