Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 24ab54cb authored by Ollie Wild's avatar Ollie Wild Committed by Paul Mundt
Browse files

sh: Fix TCP payload csum bug in csum_partial_copy_generic().



There's a bug in the Hitachi SuperH csum_partial_copy_generic()
implementation.  If the supplied length is 1 (and several alignment
conditions are met), the function immediately branches to label 4.
However, the assembly at label 4 expects the length to be stored in
register r2.  Since this has not occurred, subsequent behavior is
undefined.

This can cause bad payload checksums in TCP connections.

I've fixed the problem by initializing register r2 prior to the branch
instruction.

Signed-off-by: default avatarOllie Wild <aaw@rincewind.tv>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 8b395265
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment