The branch, master has been updated via 85b51c2 Bump version to 1.3.2 via d610c8d swrap: don't read the callers msg_control buffer in swrap_recvmsg_before_unix() from db594f1 swrap: don't touch msg_tmp in swrap_recvmsg_after_unix() on error
https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 85b51c275dfef9318f9fe76190a09ddd3a02ddc5 Author: Andreas Schneider <a...@samba.org> Date: Wed Feb 10 10:49:30 2021 +0100 Bump version to 1.3.2 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit d610c8d5b32db5c3cc6e57b11d1d2e1505975832 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Feb 10 10:45:11 2021 +0100 swrap: don't read the callers msg_control buffer in swrap_recvmsg_before_unix() For recvmsg() msg_control is a write only buffer, that is filled by the kernel, but the kernel won't read from that buffer. So we shouldn't read from (copy) it either. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> ----------------------------------------------------------------------- Summary of changes: CHANGELOG | 3 +++ CMakeLists.txt | 4 ++-- src/socket_wrapper.c | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/CHANGELOG b/CHANGELOG index 1292599..c2cbb23 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ ChangeLog ========== +version 1.3.2 (released 2021-02-10) + * Fixed possible memory leak between swrap_recvmsg_{before,after}_unix() + version 1.3.1 (released 2021-02-09) * Fixed copy on write leak of ~38M for every fork * Fixed issue with accept() on FreeBSD diff --git a/CMakeLists.txt b/CMakeLists.txt index ac8c1fc..13be7fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") include(DefineCMakeDefaults) include(DefineCompilerFlags) -project(socket_wrapper VERSION 1.3.1 LANGUAGES C) +project(socket_wrapper VERSION 1.3.2 LANGUAGES C) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) @@ -25,7 +25,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) # Increment PATCH. set(LIBRARY_VERSION_MAJOR 0) set(LIBRARY_VERSION_MINOR 2) -set(LIBRARY_VERSION_PATCH 1) +set(LIBRARY_VERSION_PATCH 2) set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}") set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR}) diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 59fb07d..a950a0a 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -5993,7 +5993,6 @@ static int swrap_recvmsg_before_unix(struct msghdr *msg_in, if (cm_data == NULL) { return -1; } - memcpy(cm_data, msg_in->msg_control, msg_in->msg_controllen); msg_tmp->msg_controllen = cm_data_space; msg_tmp->msg_control = cm_data; -- Socket Wrapper Repository