]> git.ipfire.org Git - thirdparty/rsync.git/commit
fix signed integer overflow in proxy protocol v2 header parsing master
authorAndrew Tridgell <andrew@tridgell.net>
Thu, 16 Apr 2026 00:50:49 +0000 (10:50 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Thu, 16 Apr 2026 03:59:52 +0000 (13:59 +1000)
commitd1df0aaf70b0c02776d20f17786d73f645cc2983
treed5df31e9a3ddacfa92b040acb02df835af24d148
parent15d8e49a64b6e2a4e2de35e6e7c0c07b467615e8
fix signed integer overflow in proxy protocol v2 header parsing

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.
clientname.c