[OpenSIPS-Devel] [OpenSIPS/opensips] f4980d: proto_hep: Do not corrupt PKG memory if HEP3 buffe...

Liviu Chircu noreply at github.com
Wed Nov 17 17:36:39 EST 2021


  Branch: refs/heads/3.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: f4980dd6300d3ae3aac33ac898501f66847414e9
      https://github.com/OpenSIPS/opensips/commit/f4980dd6300d3ae3aac33ac898501f66847414e9
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2021-11-17 (Wed, 17 Nov 2021)

  Changed paths:
    M modules/proto_hep/hep.c

  Log Message:
  -----------
  proto_hep: Do not corrupt PKG memory if HEP3 buffer too small

This patch makes proto_hep more stable in production, so it doesn't
cause a crash if it reaches an unexpected state, such as "buffer too
small" followed by overrunning the PKG buffer, for example:

CRITICAL:core:qm_debug_frag:  qm_*: prev. fragm.
    tail overwritten(f00000a000c0000, abcdefedabcdefa0)
    [0x7f1b840306c8:0x7f1b840306f8] (build_hep3_buf, hep.c:1347)!

Now, the respective tracing will simply fail and OpenSIPS processing
continues safely.  Still, the original bug remains to be understood and
addressed.

Issue discovered during OpenSIPIt'02,
        thanks to Alfred Farrugia & Sandro Gauci (Enable Security)

(cherry picked from commit 78e4356aee36eb4cc4b89f712462588c1af28470)





More information about the Devel mailing list