Don't call tcp_lro_rx() unless hardware verified TCP/UDP csum
ClosedPublic

Authored by shurd on Dec 20 2017, 7:55 PM.

Details

Summary

It seems that tcp_lro_rx() doesn't verify TCP checksums, so
if there are bad checksums in the packets caused by invalid data, the
invalid data will pass through without errors.

This was noticed with the igb driver and a specific internet host:
fetch http://www.mpfr.org/mpfr-current/mpfr-3.1.6.tar.xz -o test.bin && sha256 test.bin
Would result in a different value sometimes.

This ends up making LRO require RXCSUM to be enabled, and RXCSUM to
support TCP and UDP checksums.

Test Plan

Verify mpfr.org fetch works, run tests with corrupt packet data

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
shurd created this revision.Dec 20 2017, 7:55 PM
sbruno accepted this revision.Dec 20 2017, 9:04 PM

This was noted in the FreeBSD Cluster as well. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224346 Ensure this Bug is added to the commit.

stlgtm

This revision is now accepted and ready to land.Dec 20 2017, 9:04 PM
This revision was automatically updated to reflect the committed changes.