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 potential DoS with responding to responses #247

Merged
merged 1 commit into from Jun 2, 2023
Merged

Conversation

barrucadu
Copy link
Owner

An attacker could send a packet with the source address and port being resolved's, which will make resolved send the response to itself. But resolved responds to an unexpected response by sending a format error response. Which would go back to itself, again, triggering an infinite loop of responses.

Much as it pains me to just drop a perfectly decodable, but invalid, message, this is the best solution since there isn't really a way to reliably tell if an attacker is triggering this case (eg, they could use two instances running on different IPs and bounce responses between them).

Fixes #246

An attacker could send a packet with the source address and port being
resolved's, which will make resolved send the response to itself.  But
resolved responds to an unexpected response by sending a format
error *response*.  Which would go back to itself, again, triggering an
infinite loop of responses.

Much as it pains me to just drop a perfectly decodable, but invalid,
message, this is the best solution since there isn't really a way to
reliably tell if an attacker is triggering this case (eg, they could use
two instances running on different IPs and bounce responses between
them).

See #246
@barrucadu barrucadu merged commit fac82ef into master Jun 2, 2023
3 checks passed
@barrucadu barrucadu deleted the fix/246 branch June 2, 2023 08:59
barrucadu added a commit to barrucadu/nixfiles that referenced this pull request Jun 2, 2023
Fixes a potential DoS issue[1]

[1] barrucadu/resolved#247
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.

Network and CPU DoS vulnerability due to handling of QR=1 messages.
1 participant