Skip to content
Memory corruption Advisory Advanced CVE-2021-26560CVE-2021-26561CVE-2021-26562

Synology DSM synoagentregisterd server finder out-of-bounds write vulnerability

The synoagentregisterd service parses the plaintext HTTP response from global.quickconnect.to into a fixed 128-byte stack buffer without a length limit. An attacker who can man-in-the-middle that connection could send an overlong finder site value and overwrite the stack, potentially achieving remote code execution.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Critical 9.4 View original

An out-of-bounds write vulnerability exists in the synoagentregisterd server finder functionality of Synology DSM 6.2.3 25426 DS120j. A specially crafted HTTP response can lead to remote code execution.

Claudio Bozzato and Lilith >_>, 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 response body is parsed with an unbounded sscanf %s conversion into a 128-byte stack buffer.

Impact

An attacker able to man-in-the-middle the connection could potentially execute arbitrary code as root, though DSM's AppArmor profile restricts the service until bypassed.

What the attacker needed

Attacker on the network path (MITM); plaintext HTTP to the finder server

The fix

The vendor patched the issue in February 2021; the parsing should bound the copied value to the buffer size.

How it was found

  1. The service requests the finder server over plain HTTP from global.quickconnect.to.
  2. An attacker on the network path intercepts and alters the response.
  3. The altered finder site value is parsed into the fixed-size stack buffer.
  4. The oversized value overflows the stack, potentially leading to code execution.

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 small program on the NAS asks a Synology server over unencrypted HTTP where to send its address next. It copies the reply into a small fixed-size box in memory without checking the length, so a longer reply spills past the box and corrupts nearby memory. Someone sitting on the network path can tamper with that reply and possibly run their own code on the device.

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 Claudio Bozzato

View all

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