Skip to content

More various fixes (casting, missing checks etc...)#20

Open
gasbytes wants to merge 10 commits intowolfSSL:masterfrom
gasbytes:fixes-2
Open

More various fixes (casting, missing checks etc...)#20
gasbytes wants to merge 10 commits intowolfSSL:masterfrom
gasbytes:fixes-2

Conversation

@gasbytes
Copy link
Contributor

@gasbytes gasbytes commented Feb 6, 2026

Detected while fuzzing it through sequence (single packets, multiple, and more mutations).

- validate TCP header langth against IP payload and see if it actually
  fits or not, return on error
…mbers, preventing unsigned wraparound in bytes_in_flight
…cksum update

- add tcp_seq_inc() helper for wrap-safe sequence number arithmetic,
  replacing bare ee32(tcp->seq) + 1 in all five call sites
- fold carry in ICMP echo reply checksum update to avoid uint16_t truncation
@gasbytes gasbytes self-assigned this Feb 6, 2026
@gasbytes gasbytes assigned danielinux and unassigned gasbytes Feb 6, 2026
@gasbytes gasbytes requested a review from danielinux February 6, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants