Skip to content
DoS Disclosed report Intermediate

Assertion `len == 1' failed, process aborted while streaming ouput from remote server

Streaming fuzzed data from a remote server to a PuTTY client triggered an assertion failure in the text rendering code, aborting the process. An attacker controlling a remote host could crash the client and cause loss of scrollback data.

geeknik Follow

Originally disclosed on HackerOne

  • Triaged in 6 days
  • Fixed in 37 days
  • Paid in 15 days
  • Disclosed after 9 months

Summary: During the course of testing putty-0.70-2019-02-12.75dda5e on Fedora 29 compiled with clang version 7.0.1 (Fedora 7.0.1-1.fc29), we discovered it was possible to abort a remote client by streaming data at it in such a way as to trigger an assertion failure.

putty: unix/gtkwin.c:3801: void do_text_internal(GtkFrontend *, int, int, wchar_t *, int, unsigned long, int, truecolour): Assertion `len == 1' failed.
Aborted (core dumped)

Description: An assertion is a statement that a predicate (Boolean-valued function, i.e. a true–false expression) is always true at that point in code execution. It can help a programmer read the code, help a compiler compile it, or help the program detect its own defects.

Steps To Reproduce:

  1. Download PuTTY snapshot
  2. Compile with Clang
  3. Launch PuTTY with your favorite debugger.
  4. Connection to remote host
  5. On remote host:

mkdir corpus && git clone https://gitlab.com/akihe/radamsa.git && cd radamsa && make && sudo make install && cd ~ 6. On remote host, upload the attached files to the corpus directory we created in step 4. 7. On remote host type while true; radamsa -s 420 -o - -n inf corpus/*; done and let run until crashes.

Supporting Material/References:

A sample screenshot taken while fuzzing PuTTY:

Screenshot_2019-02-13_13-27-15.png
Screenshot_2019-02-13_13-27-15.png From the original on HackerOne

I've also attached the core dump that happened at the time of the crash.

Impact

Denial of service, crash, loss of data contained in scroll back

The original report as published on HackerOne, by geeknik. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 text rendering code assumed a wide character would always be a single unit and asserted on that assumption rather than handling the unexpected input.

Impact

A malicious or compromised remote host could crash the client, causing denial of service and loss of scrollback data.

What the attacker needed

Attacker controls the remote host; victim connects with affected PuTTY build

How it was found

  1. Build PuTTY from a snapshot with Clang.
  2. Launch PuTTY under a debugger.
  3. Connect to a remote host.
  4. On the remote host, install a fuzzer and place sample files in a corpus directory.
  5. Run the fuzzer in a loop to stream mutated data to the client until it crashes.

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.

PuTTY is a program people use to connect to remote computers. The program contains internal checks (assertions) that stop it if something unexpected happens. Here, data sent from the remote side made one of those checks fail, so the program shut itself down instead of handling the situation gracefully.

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 geeknik

View all

79 more disclosed reports, best first.

More from PuTTY (European Commission - DIGIT)

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.