Skip to content
DoS Advisory Intermediate

GHSL-2020-025: OOB read and DoS in PureFTPd

The last item in the diraliases linked list is not terminated with a NULL pointer, so functions that traverse the list read past its end. An authenticated attacker can send a SITE alias command to trigger an out-of-bounds read and crash the server.

antonio-morales Follow

Originally disclosed on GitHub Security Lab

An uninitialized pointer vulnerability has been detected in PureFTPd which results in out-of-bounds (OOB) reads. It could also allow an attacker to trigger a Denial of Service against PureFTPD.

antonio-morales, 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

The init_aliases function fails to set the next pointer of the last linked-list item to NULL, so list traversal does not stop at the end.

Impact

This issue may lead to an out-of-bounds read and a denial of service that requires authentication.

What the attacker needed

Valid user credentials; diraliases feature enabled; server running with alias configuration

The fix

The fix was to set the next pointer of the last list item to NULL.

How it was found

  1. Compile PureFTPD with AddressSanitizer and comment out setrlimit(RLIMIT_DATA).
  2. Copy the provided alias configuration file into the configuration directory.
  3. Run PureFTPD as root with the -S parameter.
  4. Connect to the FTP server and log in with a valid user and password.
  5. Send the SITE alias command.
  6. PureFTPD should crash.

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.

A linked list is a chain of items where each item points to the next. The last item should point to nothing (NULL) to mark the end. Here the last item was left pointing to an undefined place, so when the program walks the list it keeps going into memory it should not read, which can crash the server.

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 antonio-morales

View all

45 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.