Skip to content
DoS Advisory Intermediate CVE-2023-1667

GHSL-2023-032_GHSL-2023-042: Denial of Service in libssh - CVE-2023-1667

The libssh server mishandles SSH_MSG_KEXINIT packets sent after authentication, causing a NULL pointer dereference, and several GSSAPI functions leak memory on some code paths. An attacker could trigger a post-authentication denial of service via the crash or by exhausting memory through repeated leaks.

philipturnbull Follow

Originally disclosed on GitHub Security Lab

The libssh server logic does not correctly handle SSHMSGKEXINIT packets sent after a client authenticates which can allow an attacker to trigger a NULL pointer dereference, causing a denial-of-service.

philipturnbull, on GitHub Security Lab

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

Likely the server does not initialise the server key-exchange method list for post-authentication KEXINIT packets, leading to a NULL dereference, and several GSSAPI code paths fail to free allocated memory.

Impact

An attacker could cause a post-authentication denial-of-service via a NULL pointer dereference, and repeated exploitation of the memory leaks could cause excessive memory use and denial-of-service.

What the attacker needed

Authenticated SSH session; GSSAPI authentication enabled

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.

libssh is a library that implements the SSH protocol, used for secure remote login. A denial-of-service means making a service unavailable, here by crashing it or using up its memory. The report found that after logging in, a specially crafted message could crash the server, and that some authentication code forgot to free memory, so repeating it could exhaust memory.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by philipturnbull

View all

4 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.