CVE-2021-47459
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
22/05/2024
Last modified:
14/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv<br />
<br />
It will trigger UAF for rx_kref of j1939_priv as following.<br />
<br />
cpu0 cpu1<br />
j1939_sk_bind(socket0, ndev0, ...)<br />
j1939_netdev_start<br />
j1939_sk_bind(socket1, ndev0, ...)<br />
j1939_netdev_start<br />
j1939_priv_set<br />
j1939_priv_get_by_ndev_locked<br />
j1939_jsk_add<br />
.....<br />
j1939_netdev_stop<br />
kref_put_lock(&priv->rx_kref, ...)<br />
kref_get(&priv->rx_kref, ...)<br />
REFCOUNT_WARN("addition on 0;...")<br />
<br />
====================================================<br />
refcount_t: addition on 0; use-after-free.<br />
WARNING: CPU: 1 PID: 20874 at lib/refcount.c:25 refcount_warn_saturate+0x169/0x1e0<br />
RIP: 0010:refcount_warn_saturate+0x169/0x1e0<br />
Call Trace:<br />
j1939_netdev_start+0x68b/0x920<br />
j1939_sk_bind+0x426/0xeb0<br />
? security_socket_bind+0x83/0xb0<br />
<br />
The rx_kref&#39;s kref_get() and kref_put() should use j1939_netdev_lock to<br />
protect.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.4 (including) | 5.4.156 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.76 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.14.15 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc6:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/6e8811707e2df0c6ba920f0cad3a3bca7b42132f
- https://git.kernel.org/stable/c/864e77771a24c877aaf53aee019f78619cbcd668
- https://git.kernel.org/stable/c/a0e47d2833b4f65e6c799f28c6b636d36b8b936d
- https://git.kernel.org/stable/c/d9d52a3ebd284882f5562c88e55991add5d01586
- https://git.kernel.org/stable/c/6e8811707e2df0c6ba920f0cad3a3bca7b42132f
- https://git.kernel.org/stable/c/864e77771a24c877aaf53aee019f78619cbcd668
- https://git.kernel.org/stable/c/a0e47d2833b4f65e6c799f28c6b636d36b8b936d
- https://git.kernel.org/stable/c/d9d52a3ebd284882f5562c88e55991add5d01586



