Reach lldpd · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
lldpd is an implementation of IEEE 802.1ab (LLDP). Prior to version 1.0.22, lldpd_decode() in src/daemon/lldpd.c strips 802.1Q VLAN tags from received Ethernet frames by calling memmove() to shift the frame payload 4 bytes left. The third argument (byte count) is s - 2 * ETHER_ADDR_LEN but should be s - 2 * ETHER_ADDR_LEN - 4, causing a 4-byte heap buffer over-read past the malloc(h_mtu) allocation when the received frame size equals the interface MTU. This issue has been patched in version 1.0.22.
Published 2026-06-09NVD
CVSS 3.1Adjacent network · no privileges · no user interaction
How it is reached
- Attack vector
- Adjacent network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
What it costs
- Confidentiality
- None
- Integrity
- None
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Fable 5.1 · high confidence · 2026-11-05
The vulnerable VLAN-decapsulation memmove in lldpd_decode() is present and unpatched in output/build/lldpd-1.0.18/src/daemon/lldpd.c:574-575 (byte count is s - 2*ETHER_ADDR_LEN, missing the "- 4" from upstream fix ca931be6); the only Infix patch applied touches control-socket group permissions in lldpd_main(), not the decode path.
lldpd_decode() is unconditional receive-path code, not behind any configure option.
LLDP is enabled in the factory default configuration (src/confd/share/factory.d/10-infix-services.json sets infix-lldp:enabled=true), confd enables the lldpd finit service, and it listens on all non-DSA-conduit interfaces, so any adjacent device on any Ethernet port can deliver a VLAN-tagged, MTU-sized frame to the affected code without authentication.
Evidence 11
VLAN strip branch: memmove(frame+12, frame+16, s - 2*ETHER_ADDR_LEN) — the unfixed byte count described by the CVE; upstream fix subtracts 4
output/build/lldpd-1.0.18/src/daemon/lldpd.c:570-576
Reception buffer is malloc(hardware->h_mtu) and recv() is bounded by h_mtu, so an MTU-sized tagged frame makes the memmove read 4 bytes past the allocation
output/build/lldpd-1.0.18/src/daemon/lldpd.c:1040-1044
Only one patch applied: 0001-lldpd-allow-all-users-of-group-wheel-to-connect.patch
output/build/lldpd-1.0.18/.applied_patches_list
Hunks are at lldpd_main() lines ~1572/1777/1815 (control socket chown/chmod); does not touch lldpd_decode()
patches/lldpd/1.0.18/0001-lldpd-allow-all-users-of-group-wheel-to-connect.patch
Configure options only toggle protocol TLV features (cdp/fdp/edp/sonmp/lldpmed/dot1/dot3/custom); lldpd_decode VLAN handling is core code, not optional
buildroot/package/lldpd/lldpd.mk:26-39
BR2_PACKAGE_LLDPD=y — package selected for the target image
output/.config:3291
Factory default: "ieee802-dot1ab-lldp:lldp": { "infix-lldp:enabled": true }
src/confd/share/factory.d/10-infix-services.json:2-3
lldp_change(): when /ieee802-dot1ab-lldp:lldp/infix-lldp:enabled is true confd calls finit_enable("lldpd")
src/confd/src/services.c:504-510
Service runs lldpd -d -C '*,!dsa*' — listens on all interfaces except DSA conduit ports
output/target/etc/finit.d/available/lldpd.conf:1-2
BPF receive filter accepts frames by destination multicast MAC (01:80:c2:00:00:0e etc.) irrespective of ethertype, so 802.1Q-tagged frames reach lldpd_decode()
output/build/lldpd-1.0.18/src/daemon/lldpd.h:268-283
YANG leaf /ieee802-dot1ab-lldp:lldp/infix-lldp:enabled is the operator switch (default on via factory config)
src/confd/yang/confd/infix-lldp@2025-05-05.yang:34-40
Version and patches
Affected: lldpd < 1.0.22 per GHSA-2g8p-2h3j-63m3; fixed in 1.0.22 (commit ca931be63a9cae0fcd8e9b6ae4e916d49f141cd6, PR #787). This build: 1.0.18, inside the affected range. Source in tree still contains the vulnerable memmove count; no stable backport present. Applied patches: 0001-lldpd-allow-all-users-of-group-wheel-to-connect.patch only (unrelated to this CVE). No Buildroot IGNORE_CVES entry.
Recommendation
Upgrade lldpd to 1.0.22 or later, or backport the one-line fix from commit ca931be6 (change the memmove length to s - 2 * ETHER_ADDR_LEN - 4 in src/daemon/lldpd.c lldpd_decode) as a patch under patches/lldpd/1.0.18/. Impact is a 4-byte heap over-read (potential lldpd crash/DoS) from any link-adjacent sender on any port since LLDP is on by default; interim mitigation is disabling LLDP via /ieee802-dot1ab-lldp:lldp/infix-lldp:enabled=false, which is not a reasonable default for a switch product.
Open questions
Whether the over-read is practically triggerable depends on the kernel delivering a frame whose captured length exactly equals h_mtu for the interface (the advisory states this is the trigger condition); this was not tested per scope. Whether the finit service also has a respawn policy that limits DoS impact was not checked.
Members of Kernel Kit decide. Sign in if you are one.