[OpenSIPS-Devel] [OpenSIPS/opensips] 9a0a3b: mi_fifo: Fix double fclose() during error handling

Liviu Chircu noreply at github.com
Fri Mar 4 15:43:13 UTC 2022


  Branch: refs/heads/3.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 9a0a3b72891b96dcde02ecbd8a6679cbac37d3f0
      https://github.com/OpenSIPS/opensips/commit/9a0a3b72891b96dcde02ecbd8a6679cbac37d3f0
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2022-03-04 (Fri, 04 Mar 2022)

  Changed paths:
    M modules/mi_fifo/fifo_fnc.c

  Log Message:
  -----------
  mi_fifo: Fix double fclose() during error handling

Example double-free scenario (multiple ones were possible):
  mi_fifo_callback
    -> mi_fifo_reply -> mi_fifo_flush -> mi_fifo_write -> ERROR -> fclose()
    -> mi_throw_error -> mi_fifo_write -> ERROR -> fclose()

Many thanks to David Escartin (Sonoc) for a detailed report!

(cherry picked from commit 85ba95d105dd564bdd1b02282dff1e6ab8ac109a)





More information about the Devel mailing list