Advisory

GHSA-x462-89pf-6r5h

Also known as: BIT-syncthing-2021-21404, CVE-2021-21404, GO-2022-0888

Summary

Crash due to malformed relay protocol message

Details

Impact

  1. syncthing can be caused to crash and exit if sent a malformed relay protocol message message with a negative length field.
  1. The relay server strelaysrv can be caused to crash and exit if sent a malformed relay protocol message with a negative length field.

At no point is sensitive data exposed or liable to be altered due to this
issue. Sensitive data is never exposed to relay operators. Syncthing itself
would need to be lured to connect to a malicious relay server in order to
exploit the issue.

Patches

Fixed in version 1.15.0.

Workarounds

  1. No known workaround for strelaysrv.
  1. syncthing can be configured to not use relays, or to only use specific, trusted relays. If Syncthing is used in a closed environment or with relaying disabled, i.e., it does not communicate with unknown relays, Syncthing is not vulnerable.

For more information

If you have any questions or comments about this advisory, please discuss it on the forum.

Thanks to Wojciech Paciorek for discovering and reporting this issue.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2021-05-21 16:23 UTC
Modified
2026-07-08 06:30 UTC

Affected packages and fixes

github.com/syncthing/syncthing

Go · All systems

Affected

  • introduced 0, fixed 1.15.0 (semver)

Fixed versions

1.15.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences