staging: nvec: fix use-after-free in nvec_rx_completed()
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel f19a5bc059051143c489dd6f79a0f9c3bfd13aea, Kernel 08626fcfe12308ca3f8b22c538ba7dee0b2dce7a, Kernel 26813881181deb3a32fbb59eadb2599cbe8423f6 and 12 more.
In the Linux kernel, the following vulnerability has been resolved: staging: nvec: fix use-after-free in nvec_rx_completed() In nvec_rx_completed(), when an incomplete RX transfer is detected, nvec_msg_free() is called to return the message back to the pool by clearing its 'used' atomic flag. Immediately after this, the code accesses nvec->rx->data[0] to check the message type. Since nvec_msg_free() marks the pool slot as available via atomic_set(), any concurrent or subsequent call to nvec_msg_alloc() could claim that same slot and overwrite its data[] array. Reading nvec->rx->data[0] after freeing the message is therefore a use-after-free. Fix this by saving the message type byte before calling nvec_msg_free(), then using the saved value for the battery quirk check.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <f19a5bc059051143c489dd6f79a0f9c3bfd13aea, >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <08626fcfe12308ca3f8b22c538ba7dee0b2dce7a, >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <26813881181deb3a32fbb59eadb2599cbe8423f6, >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <5de04caa46b635e180cecbd164e333eca535db94, >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <6b2ea886ebdae44a2394029844a4e78f58e1587d, >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <9f7fe4165a1f1014bdadc8e744c0fd3c2d8c0b89, >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <a37625c7b688fcf68a54263528eccbabfd7fa17a, >=d6bdcf2e1019351cbc176e963b7756766bdd8721 <bb3d592c7d6c4ec8ac6640c690ca13298e7e8e90, =3.2 | f19a5bc059051143c489dd6f79a0f9c3bfd13aea, 08626fcfe12308ca3f8b22c538ba7dee0b2dce7a, 26813881181deb3a32fbb59eadb2599cbe8423f6, 5de04caa46b635e180cecbd164e333eca535db94, 6b2ea886ebdae44a2394029844a4e78f58e1587d, 9f7fe4165a1f1014bdadc8e744c0fd3c2d8c0b89, a37625c7b688fcf68a54263528eccbabfd7fa17a, bb3d592c7d6c4ec8ac6640c690ca13298e7e8e90 |
| linux-kernel: Kernel | >=5.11.0 <5.15.212, >=5.16.0 <6.1.178, >=6.13.0 <6.18.40, >=6.19.0 <7.1.5, >=6.2.0 <6.6.145, >=6.7.0 <6.12.97, >=3.2.0 <5.10.261 | 5.15.212, 6.1.178, 6.18.40, 7.1.5, 6.6.145, 6.12.97, 5.10.261 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket