Cloudanix VulnDB

CVE-2024-3120

Critical · 9.0

CVSS

9.0

EPSS

1.9%

Published

Apr 10, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A network analysis tool used for phone-system traffic can be taken over or crashed remotely when it receives specially crafted messages.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
High
Impact
Remote Code Execution
Component
Application
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Stack-based buffer overflow due to missing bounds checks on 'Content-Length' and 'Warning' SIP headers inside sip_validate_packet and sip_parse_extra_headers, resulting in memory corruption that can yield arbitrary code execution or denial of service.

Why it matters to the business

Remote attackers can compromise systems running SIP analysis tools, enabling code execution on monitoring hosts and potential disruption of VoIP troubleshooting or security operations.

How an attack unfolds

An attacker sends a crafted SIP message containing oversized Content-Length or Warning headers to a vulnerable sngrep process; the headers are copied into fixed-size stack buffers without length validation, corrupting adjacent memory and allowing control-flow hijacking or a crash.

How to fix it

Upgrade irontec/sngrep to commit 373abb90804ba71f980c7120e62f90d3a5c81213 or later. For debauchee/barrier update to commit 229abab99f39f11624e5651f819e7f1f8eddedcc. Apply patches or rebuild from the fixed source.

How to confirm the fix worked

Confirm the installed commit or version matches the fixed hash. Perform negative testing with boundary-exceeding SIP headers and verify absence of crashes or unexpected behavior.

Typical attack path

  1. Locate an exposed sngrep instance accepting SIP traffic
  2. Construct a SIP packet with excessively long header values
  3. Transmit the packet to trigger the overflow in header parsing
  4. Leverage memory corruption for code execution or service denial

How to detect it

Review sngrep process logs and system crash dumps for segmentation faults during SIP header parsing. Correlate with network captures showing SIP messages containing abnormally large Content-Length or Warning fields.

  • sngrep segmentation fault
  • sip_validate_packet
  • sip_parse_extra_headers
  • oversized Content-Length header
  • oversized Warning header

What your security team should do

  • Apply the listed upstream commits immediately on all affected deployments
  • Restrict inbound SIP access to sngrep instances to trusted sources only
  • Add network-level filtering for malformed or oversized SIP headers
  • Monitor build pipelines for downstream packages that embed the vulnerable code

The record

A stack-buffer overflow vulnerability exists in all versions of sngrep since v1.4.1. The flaw is due to inadequate bounds checking when copying 'Content-Length' and 'Warning' headers into fixed-size buffers in the sip_validate_packet and sip_parse_extra_headers functions within src/sip.c. This vulnerability allows remote attackers to execute arbitrary code or cause a denial of service (DoS) via crafted SIP messages.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 sngrep 0 No fix
Debian:12 sngrep 0 No fix
Debian:13 sngrep 0 1.8.1-1
Debian:14 sngrep 0 1.8.1-1
SUSE:Package Hub 15 SP5 sngrep 0 1.8.1-bp155.2.3.1
Ubuntu:16.04:LTS sngrep 0 No fix
Ubuntu:18.04:LTS sngrep 0 No fix
Ubuntu:20.04:LTS sngrep 0 No fix
Ubuntu:22.04:LTS sngrep 0 No fix
Ubuntu:24.04:LTS sngrep 0 No fix
Ubuntu:24.10 sngrep 0 No fix
Ubuntu:25.04 sngrep 0 No fix
Ubuntu:25.10 sngrep 0 No fix
Ubuntu:Pro:16.04:LTS sngrep 0 No fix
Ubuntu:Pro:18.04:LTS sngrep 0 No fix
Ubuntu:Pro:20.04:LTS sngrep 0 No fix
openSUSE:Leap 15.5 sngrep 0 1.8.1-bp155.2.3.1
openSUSE:Tumbleweed sngrep 0 1.8.1-1.1

Related vulnerabilities