From: Jérémie Galarneau Date: Tue, 9 Mar 2021 21:39:11 +0000 (-0500) Subject: Fix: event-expr-to-bytecode: use after free in logging on error X-Git-Tag: v2.13.0-rc1~252 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a3088f1a14942fade23f14d778ca635305fb6e84;p=lttng-tools.git Fix: event-expr-to-bytecode: use after free in logging on error 1448709 Use after free This could cause an immediate crash or incorrect values might be read subsequently resulting in incorrect computations. In event_expr_to_bytecode_recursive: A pointer to freed memory is dereferenced, used as a function argument, or otherwise used (CWE-416) Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: Ifde0e21dbf6bf08be07b38f9c38896bdce973132 --- diff --git a/src/common/event-expr-to-bytecode.c b/src/common/event-expr-to-bytecode.c index abc713fb3..9fe3c0350 100644 --- a/src/common/event-expr-to-bytecode.c +++ b/src/common/event-expr-to-bytecode.c @@ -114,7 +114,8 @@ int event_expr_to_bytecode_recursive(const struct lttng_event_expr *expr, bytecode, bytecode_reloc, name); free(name); if (status) { - ERR("Failed to push 'get symbol %s' in bytecode", name); + ERR("Failed to push 'get symbol %s:%s' in bytecode", + provider_name, type_name); goto end; }