Skip to content

fix signed integer overflow in proxy protocol v2 header parsing#873

Merged
tridge merged 1 commit intoRsyncProject:masterfrom
tridge:pr-proxy-overflow
Apr 16, 2026
Merged

fix signed integer overflow in proxy protocol v2 header parsing#873
tridge merged 1 commit intoRsyncProject:masterfrom
tridge:pr-proxy-overflow

Conversation

@tridge
Copy link
Copy Markdown
Member

@tridge tridge commented Apr 16, 2026

The len field in the proxy v2 header was declared as signed char, allowing a negative size to bypass the validation check and cause a stack buffer overflow when passed to read_buf() as size_t.

This bug was reported by John Walker from ZeroPath, many thanks for the clear report!

With the current code this bug does not represent a security issue as it only results in the exit of the forked process that is specific to the attached client, so it is equivalent to the client closing the socket, so no CVE for this, but it is good to fix it to prevent a future issue.

@LeftenantZero
Copy link
Copy Markdown

LGTM!

@tridge tridge force-pushed the pr-proxy-overflow branch from 5dbd9e0 to be83ede Compare April 16, 2026 03:26
The len field in the proxy v2 header was declared as signed char,
allowing a negative size to bypass the validation check and cause
a stack buffer overflow when passed to read_buf() as size_t.

This bug was reported by John Walker from ZeroPath, many thanks for
the clear report!

With the current code this bug does not represent a security issue as
it only results in the exit of the forked process that is specific to
the attached client, so it is equivalent to the client closing the
socket, so no CVE for this, but it is good to fix it to prevent a
future issue.
@tridge tridge force-pushed the pr-proxy-overflow branch from be83ede to 29c03bb Compare April 16, 2026 03:50
@tridge tridge merged commit d1df0aa into RsyncProject:master Apr 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants