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

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


  Branch: refs/heads/2.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 7f44695bf24051fe0e29c31e6231698a31fe3a5d
      https://github.com/OpenSIPS/opensips/commit/7f44695bf24051fe0e29c31e6231698a31fe3a5d
  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

(cherry picked from commit a9bdf7bf06e8b015581b3ed0701b0f0882ad670a)




More information about the Devel mailing list