Skip to content
DoS Write-up Intermediate

A Small Stone in Google’s Shoe: Auditing gnxi for Bugs

The gNOI OS Install streaming RPC in gnxi accumulates uploaded chunks in an unbounded in-memory buffer with no size limit. An authenticated attacker could open a stream, send data without ever ending the transfer, and exhaust server memory until the Go runtime crashes the process.

medium.com

Published on medium.com

I’d been hunting and learning how to hunt bugs in open source for a while. Found a few things in many random projects, nothing big.

Kazi Sabbir, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The ReceiveOS function appends every incoming chunk to a bytes.Buffer without enforcing any maximum size, so memory use grows without bound until allocation fails.

Impact

An authenticated client could crash the gNOI server process by exhausting its memory, causing a denial of service; the single-install token limits concurrency but does not prevent one stream from exhausting memory.

What the attacker needed

Valid TLS client certificate; network access to the gNOI server; authenticated mode enabled on server

The fix

The code should enforce a maximum image size inside ReceiveOS and return an error once the buffer exceeds it; the author proposed and tested such a fix but the text does not say it was merged.

How it was found

  1. Authenticate to the gNOI server with valid TLS client certificates.
  2. Open the Install RPC as a bidirectional stream.
  3. Send one TransferContent message containing image data.
  4. Never send a TransferEnd message, so the receive loop keeps waiting and appending.
  5. Continue sending data until the server's memory is exhausted and the Go runtime throws an out-of-memory panic.

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 write-up has not been written yet. The Original tab links to the source.

The server has a feature that lets a client upload a device operating system image in pieces. It stores every piece in memory but never checks how big the total is getting. A logged-in client can keep sending pieces forever, filling up the server's memory until it crashes.

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.

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.