Hi Tim,

Thanks for the quick fix. I've also tested on my side, it fixes the
issue I reported earlier.

On Sun, Jun 14, 2020 at 5:27 PM Tim Duesterhus <[email protected]> wrote:
> We cannot simply `release_sample_expr(rule->arg.vars.expr)` for a
> `struct act_rule`, because `rule->arg` is a union that might not
> contain valid `vars`. This leads to a crash on a configuration using
> `http-request redirect` and possibly others:
>
>     frontend http
>         mode http
>         bind 127.0.0.1:80
>         http-request redirect scheme https
>
> Instead a `struct act_rule` has a `release_ptr` that must be used
> to properly free any additional storage allocated.
>
> This patch fixes a regression in commit 
> ff78fcdd7f15c8626c7e70add7a935221ee2920c.
> It must be backported to whereever that patch is backported.
>
> It has be verified that the configuration above no longer crashes.
> It has also been verified that the configuration in 
> ff78fcdd7f15c8626c7e70add7a935221ee2920c
> does not leak.

Reported-by: William Dauchy <[email protected]>

> ---
>  src/haproxy.c | 1 -
>  src/vars.c    | 7 +++++++
>  2 files changed, 7 insertions(+), 1 deletion(-)

Best,
-- 
William

Reply via email to