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

dhserver: Fix a potential DoS vulnerability accidentially introduced by #1712 #1885

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

kripton
Copy link
Contributor

@kripton kripton commented Feb 4, 2023

Describe the PR
My fix in dhcpserver.c for some DHCP clients (#1712) accidentally introduced a potential DoS vulnerability (I'm sorry!): In case a DHCP-packet WITHOUT DHCP_MESSAGETYPE was received, the code jumped out of the function without freeing the pbuf as it is required. When enough such messages are received, not pbufs are available anymore to handle traffic and the system might not be able to receive any more packets.
This PR fixes the problem by properly free()ing the pbuf in case no DHCP_MESSAGETYPE is detected in the packet.

Plus a trivial whitespace fix.

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look great thank you for the fix :)

@hathach hathach merged commit 09e70eb into hathach:master Feb 13, 2023
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