can: j1939: fix Use-after-Free, hold skb ref while in use
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
can: j1939: fix Use-after-Free, hold skb ref while in use
This patch fixes a Use-after-Free found by the syzbot.
The problem is that a skb is taken from the per-session skb queue, without incrementing the ref count. This leads to a Use-after-Free if the skb is taken concurrently from the session queue due to a CTS.
From the CVE record · Linux
The Linux kernel's CAN J1939 code can use a socket buffer after it has been freed. This can happen when a buffer is taken from a session queue while a CTS concurrently removes it. The input does not specify an attacker's access requirements or the resulting impact.
Engineers running Linux kernels with CAN J1939 support should check whether their kernel is affected; no affected versions are specified.