[lttng-dev] [PATCH lttng-tools] Fix: insecure data handling
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Tue May 17 03:36:09 UTC 2016
Found by Coverity:
CID 1353462 (#1 of 1): Use of untrusted string value (TAINTED_STRING)5.
tainted_string: Passing tainted string man_bin_path to execlp, which
cannot accept tainted data.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
src/common/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/common/utils.c b/src/common/utils.c
index df55dc9..b6b45e3 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -1347,7 +1347,8 @@ end:
static const char *get_man_bin_path(void)
{
- char *env_man_path = getenv(DEFAULT_MAN_BIN_PATH_ENV);
+ char *env_man_path =
+ lttng_secure_getenv(DEFAULT_MAN_BIN_PATH_ENV);
if (env_man_path) {
return env_man_path;
--
2.1.4
More information about the lttng-dev
mailing list