net: hsr: defer node table free until after RCU readers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b9a1e627405d68d475a3c1f35e685ccfb5bbe668 · < 48d09dea506de667eb55f939bf98eec721effbdb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: hsr: defer node table free until after RCU readers
HSR node-list and node-status generic-netlink operations run under rcu_read_lock(). They walk hsr->node_db through hsr_get_next_node() and hsr_get_node_data(), but RTM_DELLINK teardown removes the same node table with plain list_del() and frees each node immediately.
That lets a generic-netlink reader hold a struct hsr_node pointer across hsr_dellink(). In a KASAN build, widening the reader window after hsr_get_next_node() obtains the node reproduces a slab-use-after-free when the reader copies node->macaddress_A; the freeing stack is hsr_del_nodes() from hsr_dellink().
Use list_del_rcu() and defer the free through the existing hsr_free_node_rcu() callback. This matches the lifetime rule used by the HSR prune paths, which already delete nodes with list_del_rcu() and call_rcu().
From the CVE record · Linux
The Linux kernel’s HSR node table can be freed while a generic-netlink reader is still using it. Concurrent HSR link teardown and node-list or node-status reads can trigger a use-after-free; the input does not specify access or authentication requirements.
Engineers running Linux kernels with HSR support should check their kernel versions against the vendor advisory; affected versions are not specified.