Skip to content

Vulnerability in the parse_uri() function

High
razvancrainea published GHSA-358f-935m-7p9c Mar 15, 2023

Package

opensips (OpenSIPS Core)

Affected versions

<=3.2

Patched versions

3.1.8, 3.2.5

Description

When a specially crafted SIP message is processed by the function rewrite_ruri, a crash occurs due to
a segmentation fault. The following backtrace was observed when reproducing this issue:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000055eabf2f9b87 in memcpy (__len=<optimized out>, __src=<optimized out>,
__dest=0x7f2223b36ea8) at parser/msg_parser.c:1156
1156 if (tmp){
(gdb) bt
#0 0x000055eabf2f9b87 in memcpy (__len=<optimized out>, __src=<optimized out>,
__dest=0x7f2223b36ea8) at parser/msg_parser.c:1156
#1 rewrite_ruri (msg=0x7f2223b362f8, sval=0x7fff665344c8, ival=ival@entry=0,
part=part@entry=RW_RURI_PORT) at parser/msg_parser.c:1087
#2 0x000055eabf1b4576 in w_setport (msg=<optimized out>, port=<optimized out>) at
core_cmds.c:754

Impact

This issue causes the server to crash. It affects configurations containing functions that make use of the
affected code, such as the function setport.

Patches

This issue has been fixed by commit b2dffe4.

References

Read more about this issue in the Audit Document section 3.13.

For more information

If you have any questions or comments about this advisory:

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2023-27597

Weaknesses

No CWEs

Credits