vxlan: keep the last remote linked during FDB flush
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vxlan: keep the last remote linked during FDB flush
A non-nexthop FDB entry is expected to have at least one remote while it remains reachable through the FDB hash table. A filtered bulk flush violates this invariant when every remote matches: It unlinks the last remote in vxlan_fdb_dst_destroy() and only afterwards tells vxlan_flush() to destroy the parent FDB entry.
An RCU reader can find the parent during this interval. first_remote_rcu() then applies list_entry_rcu() to the empty list head, producing an invalid remote pointer that the receive learning path can read from and write to.
When a matching remote is the sole remaining remote, leave it linked and ask the caller to destroy the entire FDB entry. vxlan_fdb_destroy() keeps the remote attached while sending the deletion notification and removing the parent from the lookup structures.
From the CVE record · Linux
A filtered bulk flush of a vxlan forwarding database (FDB) entry can briefly leave a reachable entry with no linked remotes. If a receive-learning reader accesses the entry during that interval, it can use an invalid pointer for reads and writes. The input does not specify attacker access or authentication requirements.
Engineers running Linux kernels with vxlan should check their exposure; affected versions are not specified.