[OpenSIPS-Devel] [OpenSIPS/opensips] 5df8b6: pua: Fix some list management bugs; Improve code

Răzvan Crainea noreply at github.com
Thu Jul 9 14:10:09 EST 2020


  Branch: refs/heads/coverity_scan
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 5df8b636a15a799b5f1ab7a58ebe1c208ce49d2d
      https://github.com/OpenSIPS/opensips/commit/5df8b636a15a799b5f1ab7a58ebe1c208ce49d2d
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-08 (Wed, 08 Jul 2020)

  Changed paths:
    M modules/pua/uri_list.h

  Log Message:
  -----------
  pua: Fix some list management bugs; Improve code

    * do not use strncmp() to compare "str" structs, since it may lead
      to false positives (e.g. strncmp("foobar", "foo", 3) == 0).  Use
      str_match() or str_strcmp() instead.

    * do not read memory after pkg_free() (severity: low, since it's PKG
      memory, so reading "invalid" heap memory works anyway...)

    * simplify list_pop() and list_free() code


  Commit: 70d2e8f10a96f751d0c8245c5f9583dc4e20804e
      https://github.com/OpenSIPS/opensips/commit/70d2e8f10a96f751d0c8245c5f9583dc4e20804e
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M modules/qrouting/qr_load.c

  Log Message:
  -----------
  qrouting: Fix Coverity paranoid warning

Even if the buffer can never be overflown here thanks to the CHAR(64) DB
schema restriction, if the user were to change the DB schema by hand and
extend the column to 65+ chars, it would crash OpenSIPS, so the warning
makes some sense.

Fixes CID #211387


  Commit: 96432213b694f3887419e7872f6fe948a1c19209
      https://github.com/OpenSIPS/opensips/commit/96432213b694f3887419e7872f6fe948a1c19209
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/reg/lookup.c

  Log Message:
  -----------
  mid_registrar: Fix uninitialized variable

Fixes CID #211376


  Commit: eb018ad58740f240ac22e19b8bd06f5fe071925f
      https://github.com/OpenSIPS/opensips/commit/eb018ad58740f240ac22e19b8bd06f5fe071925f
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/reg/lookup.c
    M modules/mid_registrar/lookup.c

  Log Message:
  -----------
  mid_registrar: Simplify lookup() code


  Commit: c6682f208c6da5ce1517737e52835aafc5b3f2fa
      https://github.com/OpenSIPS/opensips/commit/c6682f208c6da5ce1517737e52835aafc5b3f2fa
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M ut.h

  Log Message:
  -----------
  stop_expire_timer(): Fix uninitialized memory access

The severity is low, however, since uninitialized integer math is still
safe (from a stability PoV), with the resulting value being ignored
anyway.

Fixes CID #199911, #199922, #199926, #199966, #199987, #199990, #200085,
 #200054.


  Commit: a4684d54f1d32088936a345afa36cb66bbf53727
      https://github.com/OpenSIPS/opensips/commit/a4684d54f1d32088936a345afa36cb66bbf53727
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M modules/mid_registrar/save.c

  Log Message:
  -----------
  mid_registrar: Fix uninitialized variable

Although the severity is low, this code path could be triggered by a
bogus downstream registrar which returns a 200 OK without the Contact
advertised by the mid-registrar in its REGISTER request.

Fixes CID #200051


  Commit: 36a361d63cc77141314acd84551a5340b2c3db42
      https://github.com/OpenSIPS/opensips/commit/36a361d63cc77141314acd84551a5340b2c3db42
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M cfg_pp.c

  Log Message:
  -----------
  preprocessor: Fix memleak on preprocessing failure

Fixes CID #200047


  Commit: 5f03b8556bf241336795ba8ca517c982d732dd4a
      https://github.com/OpenSIPS/opensips/commit/5f03b8556bf241336795ba8ca517c982d732dd4a
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M modules/usrloc/dlist.c

  Log Message:
  -----------
  usrloc: Fix unitialized variable

CID #199971


  Commit: 2a9824cdc955eb783e08f88906b70d337dbdebe9
      https://github.com/OpenSIPS/opensips/commit/2a9824cdc955eb783e08f88906b70d337dbdebe9
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M modules/freeswitch/esl/src/esl.c

  Log Message:
  -----------
  freeswitch: Fix a rare memleak

CID #164007


  Commit: cfb4967ecf97169224fbacbab50ddcc845169ad2
      https://github.com/OpenSIPS/opensips/commit/cfb4967ecf97169224fbacbab50ddcc845169ad2
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M modules/qrouting/qr_stats.c

  Log Message:
  -----------
  qrouting: Avoid unnecessary NULL check

CID #211396


  Commit: a5fbad573e30d4400c8509bb4356c7b19d6e376d
      https://github.com/OpenSIPS/opensips/commit/a5fbad573e30d4400c8509bb4356c7b19d6e376d
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/reg/pn.c

  Log Message:
  -----------
  SIP PN support: Fix possible NULL dereference

CID #211389


  Commit: 8cec5cbc59fe06017eab3a96496489cf50bb1604
      https://github.com/OpenSIPS/opensips/commit/8cec5cbc59fe06017eab3a96496489cf50bb1604
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/reg/pn.c

  Log Message:
  -----------
  SIP PN support: Fix NULL pointer dereference

Severity: high

CID #211371


  Commit: c9753a0505b936f7d423f839a550a43bc73c7f2a
      https://github.com/OpenSIPS/opensips/commit/c9753a0505b936f7d423f839a550a43bc73c7f2a
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/reg/pn.c

  Log Message:
  -----------
  SIP PN Support: Fix a rare NULL pointer dereference

This fixes a possible crash when using a non-standard list of
PN-matching parameters (e.g. something different than
    [provider, prid, param]).

CID #211368


  Commit: 3263b27015e243d85a11375a3d60aca8ffc8472d
      https://github.com/OpenSIPS/opensips/commit/3263b27015e243d85a11375a3d60aca8ffc8472d
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M sr_module_deps.c

  Log Message:
  -----------
  Module deps: Fix missing va_end() during error handling

CID #211355


  Commit: fcdd224a5c8638a28e3be10e4028c27aa404a637
      https://github.com/OpenSIPS/opensips/commit/fcdd224a5c8638a28e3be10e4028c27aa404a637
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M mem/hp_malloc_dyn.h

  Log Message:
  -----------
  HP_MALLOC status logging: Fix incorrect bitwise shift

CID #200101


  Commit: 39fc05ec0ff2122dd79ec5582ac020c999c11c30
      https://github.com/OpenSIPS/opensips/commit/39fc05ec0ff2122dd79ec5582ac020c999c11c30
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M statistics.h

  Log Message:
  -----------
  statistics macros: Avoid unsigned integer comparisons against 0

CID #199900, #199913, #199923, #199934, #199941, #199964, #199998,
 #200032, #200049, #200074, #200096.


  Commit: 7a638403ee648ba629fd1f6f4a17bdea091da16d
      https://github.com/OpenSIPS/opensips/commit/7a638403ee648ba629fd1f6f4a17bdea091da16d
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M modules/mid_registrar/save.c

  Log Message:
  -----------
  mid_registrar: Remove unnecessary check

CID #199954


  Commit: 6c022e431b371e3850f3c3e0e17e610c2b772db2
      https://github.com/OpenSIPS/opensips/commit/6c022e431b371e3850f3c3e0e17e610c2b772db2
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/reg/pn.c
    M mem/hp_malloc_dyn.h
    M modules/mid_registrar/save.c
    M modules/qrouting/qr_stats.c
    M sr_module_deps.c
    M statistics.h

  Log Message:
  -----------
  Merge branch 'master' into coverity_scan


Compare: https://github.com/OpenSIPS/opensips/compare/03379961af81...6c022e431b37



More information about the Devel mailing list