Skip to content
Memory corruption Advisory Advanced CVE-2023-25076

SNIProxy wildcard backend hosts buffer overflow vulnerability

A stack buffer overflow in SNIProxy's handling of wildcard backend hosts allows an attacker to send a crafted HTTP or TLS packet with an overly long hostname, potentially leading to remote code execution or denial of service.

Keane O'Kelley Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

A buffer overflow vulnerability exists in the handling of wildcard backend hosts of SNIProxy 0.6.0-2 and the master branch (commit: 822bb80df9b7b345cc9eba55df74a07b498819ba). A specially crafted HTTP or TLS packet can lead to arbitrary code execution.

Keane O'Kelley, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The code uses the source length instead of the destination buffer size when copying an IPv6 address string into a fixed-size stack buffer, allowing a buffer overflow.

Impact

An attacker could achieve remote code execution or denial of service by sending a crafted HTTP, TLS or DTLS packet.

What the attacker needed

SNIProxy configured with wildcard backend hosts; Attacker can send packets to SNIProxy

The fix

The maintainer patched this in the following diff.

How it was found

  1. Configure SNIProxy with a wildcard backend host.
  2. Send a crafted HTTP or TLS packet containing an overly long hostname.
  3. The hostname is parsed by new_address(), triggering the buffer overflow.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

SNIProxy is a program that forwards web traffic based on the website name requested. When it is set up to handle wildcard names, it copies the requested name into a fixed-size memory area without checking if it fits. An attacker can send a very long name to overflow that area, which can crash the program or let the attacker run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Keane O'Kelley

View all

5 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.