From d4e3717311122d9def6e4edbebae32ab6fd06507 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 27 Mar 2020 11:01:05 -0400 Subject: [PATCH] Fix: sessiond: user/group name can be leaked on malformed command MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit process_attr_value_from_comm() can leak a copy of the user/group name when the value type is erroneous. This is not reachable in "normal" execution, but could be triggered by invalid "crafter" lttng-ctl commands. In process_attr_value_from_comm: Leak of memory or pointers to system resources (CWE-404). Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: I7ef55c0743c954a93e3d27ce17e6478708b49437 --- src/common/tracker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/tracker.c b/src/common/tracker.c index 532a924b5..c27d97655 100644 --- a/src/common/tracker.c +++ b/src/common/tracker.c @@ -173,6 +173,7 @@ enum lttng_error_code process_attr_value_from_comm( *_value = value; value = NULL; + free(name); return LTTNG_OK; error: free(name); -- 2.34.1