Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix size calculations to prevent overflowing fake_eth_hdr in IP layer mode #775

Merged
merged 2 commits into from
Feb 11, 2024

Conversation

droe
Copy link
Contributor

@droe droe commented Feb 10, 2024

  • Avoid writing more than sizeof(fake_eth_hdr) - sizeof(struct ether_header) bytes to &fake_eth_hdr[sizeof(struct ether_header)], avoiding overflow of fake_eth_hdr
  • Ensure buflen matches effective amount of data in bytes after pointing bytes to fake_eth_hdr

Should fix #580.

@zakird zakird merged commit befe4c0 into zmap:main Feb 11, 2024
@droe droe deleted the droe/fix-fake_eth_hdr-overflow branch March 11, 2024 08:01
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.

segmentation fault when sending IP layer packets
2 participants