priority tag (VLAN 0)

term

networkingsecurity

Kept in this browser · My desk

An 802.1Q tag whose VLAN identifier is 0: it carries a priority code point and no VLAN, and a bridge classifies the frame as if it were untagged, into the port's PVID.

The IEEE 802.1Q revision editor's 2022 note sets out the rules: VID 0 is not a valid PVID, and bridges do not transmit priority-tagged frames, sending frames either with a non-zero VID or untagged. Linux removes any number of VLAN 0 headers from a received frame and handles it on the untagged interface.

What it is. A priority tag is an 802.1Q tag whose VLAN (virtual local area network) identifier is 0: it carries a priority code point and no VLAN, and a bridge classifies the frame as if it were untagged, into the port's PVID (port VLAN identifier). It exists so that a station can mark a frame's priority without belonging to, or knowing about, any VLAN; the IEEE (Institute of Electrical and Electronics Engineers) calls the value 0 the null VID (VLAN identifier).

The bytes. A tag is the Tag Protocol Identifier 0x8100 (the Customer VLAN Tag Type of IANA, the Internet Assigned Numbers Authority) followed by 16 bits: a 3-bit priority code point, a 1-bit drop eligible indicator and a 12-bit VLAN identifier. Worked by hand for a voice frame at priority 5: 101 for the priority, 0 for the indicator and twelve zeros for the VLAN make 1010 0000 0000 0000, so the tag reads 81 00 A0 00. The IEEE types model allows VLAN identifiers from 1 to 4094 and forbids 0 and 4095 as VLAN indices; Wireshark shows the fields as vlan.priority, vlan.dei and vlan.id, and a priority-tagged frame is one where vlan.id is 0.

The rules. The IEEE 802.1Q revision editor's 2022 note sets out the rules: VID 0 is not a valid PVID, and bridges do not transmit priority-tagged frames, sending frames either with a non-zero VID or untagged. Every received frame, priority-tagged ones included, is classified to a VLAN, so a station that sends a priority-tagged frame through a bridge gets back a reply that is VLAN-tagged or untagged. Table 9-2 of the standard, quoted in the note, says the null VID shall not be configured as a PVID, a member of a VID set or an FDB (filtering database) entry; the note's one recorded exception is a customer bridge attached to a provider bridge, which sends S-tagged priority-tagged frames to carry priority across a network that does not read customer tags. Linux removes any number of VLAN 0 headers from a received frame and handles it on the untagged interface, and Champetier observed that some Cisco UCS servers always add a priority tag.

Why it is a security term. Etienne Champetier showed in 2020 that filters applied to the whole frame miss a packet hidden behind one or more VLAN 0 tags, because they see an 802.1Q frame rather than the IPv6 or ARP (Address Resolution Protocol) packet the host will accept. A worked case: an IPv6 Router Advertisement normally starts its payload after the EtherType 86 DD; behind a priority tag the frame reads 81 00 00 00 86 DD, a filter that drops EtherType 0x86DD router advertisements sees 0x8100 and lets it pass, and the Linux host strips the tag and processes the advertisement. Champetier found OpenStack (with the Linux bridge driver), LXD and Microsoft Hyper-V (CVE-2020-17040) affected. Combined with 802.2 LLC/SNAP (Logical Link Control, Subnetwork Access Protocol) encapsulation it bypassed first-hop security on hypervisors and switches, including the Router Advertisement Guard of a Cisco CBS350 switch, published by the CERT Coordination Center (CERT/CC) as VU#855201 on 27 September 2022 with four Common Vulnerabilities and Exposures (CVE) identifiers: CVE-2021-27853 (VLAN 0 and LLC/SNAP headers against RA guard or ARP inspection), CVE-2021-27854 (adding Ethernet to Wi-Fi frame conversion), CVE-2021-27861 (LLC/SNAP headers of invalid length) and CVE-2021-27862 (both).

The fix, and a trap in it. The advice in both was an allow-list: admit only ARP, ICMP (Internet Control Message Protocol), IPv4 and IPv6 on access ports, which the Brazilian exchange IX.br's technical requirements had imposed on its participants since 2017. Those requirements of 30 June 2017 allow only Ethernet II framing, forbid LLC/SNAP encapsulation, and list the EtherTypes IPv4, ARP, IPv6 and 0x8809 for link aggregation; their table prints IPv4 as 0x8000, a slip for the 0x0800 in IANA's registry. The trap is in the IEEE bridge model's acceptable frame types: the option a VLAN hopping checklist recommends for access ports is admit-only-untagged-and-priority-tagged, which by name still admits VLAN 0 tags, so a port hardened against double tagging can still pass the bypass. A filter that parses through every VLAN header before deciding, or a policy that drops VLAN 0 on ports where nothing legitimate sends it, closes the gap.

Neighbours. 802.1Q, VLAN, double tagging (which moves frames between VLANs, unlike a priority tag), VLAN hopping, dynamic ARP inspection and RA (Router Advertisement) guard, the controls the bypass defeats, and QoS (quality of service), the legitimate reason the tag exists.

Also known as: priority tag, priority-tagged frame, vlan 0, vid 0, vlan zero

Sources

← Back to P Back to the glossary