[Bug 257642] e1000 doesn't check for bad Rx UDP checksum

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 05 Aug 2021 18:51:14 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257642

            Bug ID: 257642
           Summary: e1000 doesn't check for bad Rx UDP checksum
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs_at_FreeBSD.org
          Reporter: nreilly_at_blackberry.com

The e1000 driver doesn't check for checksum errors on Rx UDP checksum, it marks
all packets as having a good checksum.

Suggested fix:

diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c
index 458de96a7b9..1328e12daf4 100644
--- a/sys/dev/e1000/em_txrx.c
+++ b/sys/dev/e1000/em_txrx.c
_at__at_ -797,7 +797,8 _at__at_ em_receive_checksum(uint32_t status, if_rxd_info_t ri)
                ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
                ri->iri_csum_data = htons(0xffff);
        }
-       if (status & E1000_RXD_STAT_UDPCS) {
+       if ((status & E1000_RXD_STAT_UDPCS | E1000_RXDEXT_STATERR_TCPE)) ==
+               E1000_RXD_STAT_UDPCS) {
                ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
                ri->iri_csum_data = htons(0xffff);
        }

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Thu Aug 05 2021 - 18:51:14 UTC

Original text of this message