Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: check sum header fields for validity
The rsync vulnerability CVE-2024-12084 also affected gokrazy/rsync (before this commit): An attacker could send an invalid sum header and thereby trigger a panic (but no heap buffer overflow!) like: panic: runtime error: slice bounds out of range [:512] with length 16 goroutine 277 [running]: github.com/gokrazy/rsync/rsyncd.(*sendTransfer).receiveSums(0xc0000d7b68) /home/michael/go/src/github.com/gokrazy/rsync/rsyncd/sender.go:136 +0x339 After this commit, the code no longer panics but sends an error: gokr-rsync [sender]: invalid checksum length 512
- Loading branch information