Page MenuHomeFreeBSD

pf: Fix unaligned checksum updates
ClosedPublic

Authored by kp on Dec 21 2020, 9:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:16 AM
Unknown Object (File)
Dec 14 2023, 8:22 PM
Unknown Object (File)
Nov 11 2023, 6:21 AM
Unknown Object (File)
Nov 6 2023, 10:57 AM
Unknown Object (File)
Nov 4 2023, 9:27 PM
Unknown Object (File)
Oct 31 2023, 4:56 PM
Unknown Object (File)
Oct 10 2023, 5:22 AM
Unknown Object (File)
Oct 5 2023, 9:55 AM

Details

Summary

The algorithm we use to update checksums only works correctly if the
updated data is aligned on 16-bit boundaries (relative to the start of
the packet).

Import the OpenBSD fix for this issue.

PR: 240416
Obtained from: OpenBSD

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35607
Build 32507: arc lint + arc unit

Event Timeline

kp requested review of this revision.Dec 21 2020, 9:09 AM

I guess you need a similar dance (for 16-bit) in pf_normalize_tcpopt() when updating the MSS.

Also handle the MSS update case.

This revision is now accepted and ready to land.Dec 21 2020, 11:11 PM

Ensure we actually update the packet, even when checksum flags indicate the checksum doesn't need an update.

This revision now requires review to proceed.Dec 22 2020, 12:00 PM
This revision is now accepted and ready to land.Dec 22 2020, 12:18 PM