Title: Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass · Issue #1724 · python-zeroconf/python-zeroconf · GitHub
Open Graph Title: Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass · Issue #1724 · python-zeroconf/python-zeroconf
X Title: Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass · Issue #1724 · python-zeroconf/python-zeroconf
Description: A pure python implementation of multicast DNS service discovery - Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass · Issue #1724 · python-zeroconf/python-zeroconf
Open Graph Description: A pure python implementation of multicast DNS service discovery - Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass · Issue #1724 · python-zero...
X Description: A pure python implementation of multicast DNS service discovery - Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass · Issue #1724 · python-zero...
Opengraph URL: https://github.com/python-zeroconf/python-zeroconf
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass","articleBody":"## Problem\n\n`_process_datagram_at_time` short-circuits processing only when the incoming `data` equals `self.data` — a single-slot remembered \"last packet.\" An attacker alternating between two byte-distinct payloads (A, B, A, B, …) bypasses the guard entirely on every packet, even when the actual semantic content is the same query. Combined with finding #1, this means an attacker who alternates just two TC-flagged payloads is also defeating duplicate suppression at the receive layer, and every packet flows through `DNSIncoming(...)` parse + the deferred-queue path.\n\n## Why This Matters\n\nThis converts what should be a per-source rate-limiter into a one-bit XOR puzzle. The CPU cost of parsing each packet (`DNSIncoming._initial_parse`, name decompression, NSEC bitmap decode, etc.) plus the O(N) deferred-queue dedup scan from finding #1 turns into a sustainable CPU/memory drain by one malicious LAN host.\n\n## Suggested Fix\n\nReplace the single-slot `self.data` check with a small bounded recency window (e.g. a `collections.deque` of N most-recent packet digests, or a small LRU keyed on `(addr, hash(data))`), so alternating-payload attacks no longer slip through. Keep the window small (≤16) so legitimate burst traffic still passes.\n\n## Details\n\n| | |\n|---|---|\n| **Severity** | 🟡 Medium |\n| **Category** | dos |\n| **Location** | `src/zeroconf/_listener.py:113-129` |\n| **Effort** | ⚡ Quick fix |\n\n---\n🤖 Created by Kōan from audit session","author":{"url":"https://github.com/bluetoothbot","@type":"Person","name":"bluetoothbot"},"datePublished":"2026-05-18T05:18:40Z","url":"https://github.com/python-zeroconf/python-zeroconf/issues/1724"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:fe7f9bc1-5864-fded-d942-50ae45af8ed9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 999C:338BC:1914F8:21EE3F:6B0082F7 |
| html-safe-nonce | f4668c22e1f538bfc12e8b22c9043f03acc71e4160cdacdb0eea16f3b45058f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTlDOjMzOEJDOjE5MTRGODoyMUVFM0Y6NkIwMDgyRjciLCJ2aXNpdG9yX2lkIjoiODY0ODI1MjQxMTM1OTU2MDQzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 16803dc2c6b2b6fac2cf0543b89c94cdef58177070309d5c8e6fa451c7735410 |
| hovercard-subject-tag | repository:21548731 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-zeroconf/python-zeroconf/issues/1724 |
| twitter:image | https://opengraph.githubassets.com/679968da3ade248d138438474b8969ad7b1ec544cd843e576bad7e1c5a605206/python-zeroconf/python-zeroconf |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/679968da3ade248d138438474b8969ad7b1ec544cd843e576bad7e1c5a605206/python-zeroconf/python-zeroconf |
| og:image:alt | A pure python implementation of multicast DNS service discovery - Security: Duplicate-packet suppression only compares to the most recent packet, allowing trivial bypass · Issue #1724 · python-zero... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4d3d8e50f02c1d7bf86d5acfa1d3bfe9366abd6528a6b429eb07a168429d2b61 |
| turbo-cache-control | no-cache |
| go-import | github.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git |
| octolytics-dimension-user_id | 120192235 |
| octolytics-dimension-user_login | python-zeroconf |
| octolytics-dimension-repository_id | 21548731 |
| octolytics-dimension-repository_nwo | python-zeroconf/python-zeroconf |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21548731 |
| octolytics-dimension-repository_network_root_nwo | python-zeroconf/python-zeroconf |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | db758f8e02b8257935fb03edf81a3e76eb3abd11 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width