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.
Originally disclosed on Cisco Talos
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.
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
- The service requests the finder server over plain HTTP from global.quickconnect.to.
- An attacker on the network path intercepts and alters the response.
- The altered finder site value is parsed into the fixed-size stack buffer.
- 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.