EVerest — Infinite Loop in mDNS Name Compression Pointer Parsing
In lib/everest/io, parse_name follows mDNS compression pointers with no hop limit or cycle check. A single multicast UDP packet carrying a self-referential pointer traps ChargeBridge discovery in an infinite loop on the receive path.
- Advisory
- BYTERAY-2026-0292
- CWE
- CWE-835
- CVSS
- 6.5 (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H); 6.9 (CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N)
- Vendor
- LF Energy
- Product
- EVerest
- Reported
- 2026-11-05
- Disclosure
- 2026-11-05
- Affected
- EVerest before 2026.02.2 (all releases prior to 2026.02.0, and 2026.02.0 through 2026.02.1), lib/everest/io mDNS parser
- Fixed in
- EVerest 2026.02.2 (commit defbc42eea9dcc661119b462fbec2bc9a3b25e2e) and 2026.10.0 (commit 3ff0d43933b0d84cf848e3f0e3729dafff8ef469, PR 2914)
- Credit
- Mehrun P. Hunter and Shahriyar Jalayeri, ByteRay Ltd.
Executive Summary
The mDNS parser in EVerest's lib/everest/io library resolves DNS compression pointers (0xC0) inside parse_name without enforcing a pointer hop cap, requiring backward jumps, or tracking visited offsets. When a packet contains a compression pointer that points back to its own offset (or forms a cycle with another pointer or label), curr stays in bounds and never reaches a zero-length root label.
pionix_chargebridge feeds every received multicast mDNS packet (224.0.0.251:5353) directly into parse_mdns_packet. Any host on the same local network can send one crafted UDP datagram and spin the discovery receive thread indefinitely.
Affected Products and Versions
- Product: LF Energy EVerest,
lib/everest/iomDNS parser (lib/everest/io/src/mdns/mdns.cpp), used byapplications/pionix_chargebridge. - Affected versions: EVerest versions before
2026.02.0, and2026.02.0through2026.02.1. - Tested on: EVerest commit
e640fb4aa080a3dc27b653daa5d607f041e07077. - Fixed in: EVerest
2026.02.2(defbc42eea9dcc661119b462fbec2bc9a3b25e2e, backport PR 3316) and the2026.10.0line (3ff0d43933b0d84cf848e3f0e3729dafff8ef469, PR 2914).
Technical Details
ChargeBridge discovery registers an mDNS receive callback in applications/pionix_chargebridge/src/discovery.cpp (line 64) that passes each incoming UDP buffer to everest::lib::io::mdns::parse_mdns_packet. That parser, along with parse_mdns_SRV, parse_mdns_PTR, and is_query_for, decodes domain names through parse_name in lib/everest/io/src/mdns/mdns.cpp (lines 12-40):
while (curr < size && buffer[curr] != 0) {
if ((buffer[curr] & 0xC0) == 0xC0) {
int pointer_offset = ((buffer[curr] & 0x3F) << 8) | buffer[curr + 1];
if (!moved) {
next_offset = curr + 2;
}
curr = pointer_offset;
moved = true;
} else {
int len = buffer[curr];
curr++;
for (int i = 0; i < len && curr < size; ++i) {
name += static_cast<char>(buffer[curr]);
curr++;
}
if (curr < size && buffer[curr] != 0) {
name += ".";
}
}
}
When (buffer[curr] & 0xC0) == 0xC0, curr is overwritten with the 14-bit pointer_offset from the packet. The moved flag only preserves next_offset for the caller; it does not stop the loop from following further pointers.
A two-byte question or record name at offset 12 set to {0xC0, 0x0C} computes pointer_offset = 12 on every iteration. Because 12 < size and buffer[12] (0xC0) is non-zero, the while condition never becomes false. A cycle that passes through a non-empty label before jumping back also appends to name on every pass until memory is exhausted.
Reachability and Preconditions
- The target host runs
pionix_chargebridgewith mDNS discovery enabled (or another component linked againsteverest::lib::io::mdns). Systems that do not run mDNS discovery are not affected on the coreEvseV2Gpath. - The attacker is on the same layer-2 network segment and can send an unauthenticated UDP packet to multicast
224.0.0.251:5353(or unicast to the mDNS socket). - No authentication or user interaction is required.
Impact
Infinite loop (CWE-835) and CPU exhaustion on the mDNS receive thread, or unbounded std::string growth when the pointer cycle traverses a label. A single packet from a local-network peer wedges ChargeBridge discovery until the process is restarted.
Remediation and Mitigation
Upgrade to EVerest 2026.02.2 or a 2026.10.0 build containing commit 3ff0d43933b0d84cf848e3f0e3729dafff8ef469 (PR 2914, backported as defbc42eea9dcc661119b462fbec2bc9a3b25e2e in PR 3316). The fix validates that both bytes of a compression pointer lie inside the packet, requires pointers to jump strictly backward to an offset after the 12-byte DNS header, caps pointer hops at 128, and enforces the 255-octet RFC 1035 domain-name limit.
Where upgrading is delayed, isolate ChargeBridge management interfaces onto a dedicated VLAN and block untrusted hosts from reaching UDP port 5353.
Timeline
- 2026-09-28 — Upstream fix merged to
mainin PR 2914 (3ff0d43933b0d84cf848e3f0e3729dafff8ef469), and backported tostable/2026.02on 2026-10-29 (defbc42eea9dcc661119b462fbec2bc9a3b25e2e). - 2026-11-05 — Reported to EVerest by ByteRay; EVerest released
2026.02.2and publishedGHSA-f8xm-q44r-x6cg.
Credits
Discovered and reported by Mehrun P. Hunter and Shahriyar Jalayeri of ByteRay Ltd.
EVerest credited @Mehrrun in the 2026.02.2 release notes and published GHSA-f8xm-q44r-x6cg.