CyberRota Analysis
AI-GeneratedThe vulnerability in the Linux kernel affects the nvec driver, specifically in the nvec_rx_completed() function, where a use-after-free condition can occur when accessing message data after it has been freed. This flaw could allow an attacker to exploit the race condition, potentially leading to arbitrary code execution or system instability. Organizations using affected Linux kernel versions, particularly those relying on the nvec driver for hardware communication, should prioritize applying the patch to mitigate potential risks.
Original NVD Description
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.