Linux kernel use-after-free in SRCU list splicing
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| Linux Linux | — |
|
In the Linux kernel, the following vulnerability has been resolved:
srcu: Add list_splice_init_srcu()
list_splice_init_rcu() makes a list look empty to new readers, waits for the current ones with the given sync function, and only then links the entries into the new list. The sync function takes no argument, so it can wait for RCU readers but not for the readers of an srcu_struct.
Passing synchronize_rcu() for a list read under SRCU still builds, but leaves SRCU readers on the entries while the last one's next pointer is moved onto the new list head. nvme_remove_namespaces() does this today.
Add list_splice_init_srcu(), which waits for the readers of the given srcu_struct instead.
From the CVE record · Linux
The Linux kernel can move a list entry’s next pointer while SRCU readers are still traversing the list during NVMe namespace removal. This can leave those readers traversing a list that is being changed. The input does not establish how an attacker could trigger this condition or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified.