Skip to contentSkip to conversation

Fix: insecure data handling

PATCH Jérémie Galarneau 1 participant 1 message May 17, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Fixed by:

commit 02d8ac3daf181dc8b07bf206e8cd855e74e3fcd8

Author: Michael Jeanson <[email protected]>
Date:   Tue May 17 14:12:09 2016 -0400

Fix: Free variable before strdup() in process_event_node

Fixes coverity #1243040

Thanks,
Jérémie

Quoted 28 lines · Mathieu Desnoyers

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.

---
 src/common/utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/common/utils.c +2 -2
index df55dc9..b6b45e3 100644
@@ -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

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev