[OpenSIPS-Devel] [OpenSIPS/opensips] a9bdf7: usrloc User-Agent filtering: Fix memory corruption

Liviu Chircu liviu at opensips.org
Mon Oct 3 16:57:13 CEST 2016


  Branch: refs/heads/2.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: a9bdf7bf06e8b015581b3ed0701b0f0882ad670a
      https://github.com/OpenSIPS/opensips/commit/a9bdf7bf06e8b015581b3ed0701b0f0882ad670a
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2016-10-03 (Mon, 03 Oct 2016)

  Changed paths:
    M modules/registrar/lookup.c
    M modules/usrloc/ucontact.c
    M ut.h

  Log Message:
  -----------
  usrloc User-Agent filtering: Fix memory corruption

The "ua_re_check" macro added by commit e5cb9805bc is broken in several ways:
    * unsafe read operation on shared memory
    * unsafe write operation on shared memory
    * incorrectly handled error case, without restoring the backup byte

This patch corrects the above issues by extending the user_agent buffer.

(cherry picked from commit 58a944cddbfbe7aab47a3e296d8aba5d36454a1e)

Includes fix commits:
    - 03398fbf
    - e16abb4b




More information about the Devel mailing list