[OpenSIPS-Devel] [OpenSIPS/opensips] 2af7b6: mi_fifo: Fix double fclose() during error handling
    Liviu Chircu 
    noreply at github.com
       
    Fri Mar  4 15:43:14 UTC 2022
    
    
  
  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2af7b6a2b6688cd9ea36150632efd7e5059e6286
      https://github.com/OpenSIPS/opensips/commit/2af7b6a2b6688cd9ea36150632efd7e5059e6286
  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