In the Linux kernel, the following vulnerability has been resolved:
can: j1939: prevent deadlock by moving j1939skerrqueue()
This commit addresses a deadlock situation that can occur in certain scenarios, such as when running data TP/ETP transfer and subscribing to the error queue while receiving a net down event. The deadlock involves locks in the following order:
3 j1939sessionlistlock -> activesessionlistlock j1939sessionactivate ... j1939skqueueactivatenext -> sksessionqueuelock ... j1939xtprxeoma_one
2 j1939skqueuedropall -> sksessionqueuelock ... j1939sknetdeveventnetdown -> j1939sockslock j1939netdev_notify
1 j1939skerrqueue -> j1939sockslock _j1939sessioncancel -> activesessionlistlock j1939tprxtimer
CPU0 CPU1
---- ----
lock(&priv->activesessionlistlock); lock(&jsk->sksessionqueuelock); lock(&priv->activesessionlistlock); lock(&priv->j1939socks_lock);
The solution implemented in this commit is to move the j1939skerrqueue() call out of the activesessionlist_lock context, thus preventing the deadlock situation.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54152.json"
}