Page MenuHomeFreeBSD

irdma: improve TCP header validation
Needs ReviewPublic

Authored by rscheff on Sat, Jul 18, 1:29 PM.

Details

Reviewers
tuexen
markj
kgalazka
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
transport
Summary
iWARP handling code deals with TCP header processing outside of the normal TCP stack.
Certain validation checks to verify the internal integrity of the TCP header were missing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 74955
Build 71838: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Sat, Jul 18, 1:29 PM
  • updating phabricator to show proper diff

To whom it may concern: the same problem seems to exist in the Linux source code: cm.c.

sys/dev/irdma/irdma_cm.c
2679

Indentation here looks wrong, same below.

sys/dev/irdma/irdma_utils.c
1544

Why only check this here, and not in the !gen1 case in irdma_puda_get_tcpip_info()?

If we're validating the offset here, why do it again in the functions above?

  • add a tcp_hlen check oversight and indentation
rscheff added inline comments.
sys/dev/irdma/irdma_utils.c
1544

Indeed, missed the other occurance initially.