vxlan: use one headroom snapshot for neighbour replies
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4b29dba9c085a4fb79058fb1c45a2f6257ca3dfa · < a3c5eb6e382dd426a5e7eb08608897ed57167ff7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vxlan: use one headroom snapshot for neighbour replies
vxlan_na_create() samples LL_RESERVED_SPACE() to size the reply skb and then samples it again to reserve headroom. A concurrent vxlan_changelink() can update needed_headroom between the two reads, creating a TOCTOU race. The second value can exceed the allocation and make the Ethernet header write out of bounds.
The race is reproducible on the unpatched kernel. It occurred when vxlan_na_create() generated a neighbour reply while vxlan_changelink() changed the link headroom. KASAN caught a four-byte write two bytes beyond a 704-byte skbuff_small_head allocation.
Snapshot the headroom once and use that value for both allocation and reservation.
From the CVE record · Linux
The Linux kernel's VXLAN neighbour-reply code can reserve more headroom than it allocated. If a neighbour reply is generated while the link headroom changes, the race can cause an out-of-bounds write. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with VXLAN should check whether their kernel includes this fix; affected versions were not specified.