assoc_array: don't chain a new shortcut onto an existing one
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: assoc_array: don't chain a new shortcut onto an existing one When a full node's leaves and the new key all share the node's segment, assoc_array_insert_into_terminal_node() replaces the node with a shortcut to a pair of new nodes. If the node is itself the target of a shortcut, the new shortcut is installed as that shortcut's next node, and a shortcut leading to a shortcut is something nothing expects: assoc_array_walk() indexes the second one as a node, and assoc_array_apply_edit() hits the BUG_ON() in the loop that adjusts nr_leaves_on_branch, on that same insertion. Deletion gets a node there. When the subtree below a shortcut shrinks enough, assoc_array_delete() collapses it into one node below the shortcut, and the leaves it collects can all share that node's segment. The next key that shares it too takes this path. Eighteen insertions and a deletion are enough: sixteen keys that agree on bits 0-11, one that leaves them at bit 8 and is deleted again, and one more that agrees with the sixteen. Have the new shortcut replace the one in front of the node as well. assoc_array_insert_shortcut() gives it that shortcut's back pointer and parent slot, so the caller installs it where that one was, and excises the old shortcut along with the node, which takes a second entry in excised_meta[]. The new shortcut's index key comes from the new key up to the new skip level, so it covers what the old one did. Found by a userspace test doing random insertions and deletions on keys that share long prefixes; a targeted case builds a shortcut, deletes down to the collapse and inserts one more key.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from 3cb989501c2688cacbb7dc4b0d353faf838f53a1, before dc1105e231546fdef16b8a98a36bddee08644098; from 3cb989501c2688cacbb7dc4b0d353faf838f53a1, before 61fce0632e56f9e80140453a42c8d876efd0aee7; from 3cb989501c2688cacbb7dc4b0d353faf838f53a1, before 25097b7dd44d659ea396eca9fa11f351fffcbec2; from 3cb989501c2688cacbb7dc4b0d353faf838f53a1, before 340df159851513c3d1ab73c679e13c3f9576a698; from 3cb989501c2688cacbb7dc4b0d353faf838f53a1, before 517e7bbfaf5381d47e8d393ff54c61107f8fb1bb; from 3cb989501c2688cacbb7dc4b0d353faf838f53a1, before 258745fea55ba057c062e0e680a54fde26630e95; and 2 more | dc1105e231546fdef16b8a98a36bddee08644098; 61fce0632e56f9e80140453a42c8d876efd0aee7; 25097b7dd44d659ea396eca9fa11f351fffcbec2; 340df159851513c3d1ab73c679e13c3f9576a698 |
| Linux Linux | Software | 3.13 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 8 sources for this flaw, none tagged as a vendor patch.