Fix: use-after-free with popt 1.19
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 31 Oct 2022 19:27:11 +0000 (15:27 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 2 Nov 2022 14:56:19 +0000 (10:56 -0400)
commiteaa80814dee7373f72a66107bcb406f998e37fc3
tree51b5459d9f5f70ce034c32451ae2756f7d5c6f48
parentc78c9438e998dc9a271a46362ed88bb0399558ef
Fix: use-after-free with popt 1.19

In parse_options, we loop over all non-option arguments, adding them to
opt_input_paths.

Immediately after adding `ipath' to opt_input_paths, we call
poptFreeContext.  This has the affect of free'ing pc->leftovers, which
is where these non-option arguments are stored.

This is ultimately due to this upstream commit in popt 1.19:
https://github.com/rpm-software-management/popt/commit/7182e4618ad5a0186145fc2aa4a98c2229afdfa8

This is derived from a package patch:
https://src.fedoraproject.org/rpms/babeltrace/c/d48452beff87b145c038f070e7182358db04336c?branch=rawhide

Change-Id: Icf330e53c2f4fad1d98a1ae494f2664670a0828e
Reported-by: Keith Seitz <keiths@redhat.com>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
converter/babeltrace.c
This page took 0.024498 seconds and 4 git commands to generate.