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(&amp;priv-&gt;rx_kref, ...)<br /> kref_get(&amp;priv-&gt;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&amp;#39;s kref_get() and kref_put() should use j1939_netdev_lock to<br /> protect.

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:*:*:*:*:*:*