{"id":"CVE-2021-47459","aliases":["CVE-2021-47459"],"related":[],"kind":"vulnerability","state":"published","title":"can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv\n\nIt will trigger UAF for rx_kref of j1939_priv as following.\n\n        cpu0                                    cpu1\nj1939_sk_bind(socket0, ndev0, ...)\nj1939_netdev_start\n                                        j1939_sk_bind(socket1, ndev0, ...)\n                                        j1939_netdev_start\nj1939_priv_set\n                                        j1939_priv_get_by_ndev_locked\nj1939_jsk_add\n.....\nj1939_netdev_stop\nkref_put_lock(&priv->rx_kref, ...)\n                                        kref_get(&priv->rx_kref, ...)\n                                        REFCOUNT_WARN(\"addition on 0;...\")\n\n====================================================\nrefcount_t: addition on 0; use-after-free.\nWARNING: CPU: 1 PID: 20874 at lib/refcount.c:25 refcount_warn_saturate+0x169/0x1e0\nRIP: 0010:refcount_warn_saturate+0x169/0x1e0\nCall Trace:\n j1939_netdev_start+0x68b/0x920\n j1939_sk_bind+0x426/0xeb0\n ? security_socket_bind+0x83/0xb0\n\nThe rx_kref's kref_get() and kref_put() should use j1939_netdev_lock to\nprotect.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv\n\nIt will trigger UAF for rx_kref of j1939_priv as following.\n\n        cpu0                                    cpu1\nj1939_sk_bind(socket0, ndev0, ...)\nj1939_netdev_start\n                                        j1939_sk_bind(socket1, ndev0, ...)\n                                        j1939_netdev_start\nj1939_priv_set\n                                        j1939_priv_get_by_ndev_locked\nj1939_jsk_add\n.....\nj1939_netdev_stop\nkref_put_lock(&priv->rx_kref, ...)\n                                        kref_get(&priv->rx_kref, ...)\n                                        REFCOUNT_WARN(\"addition on 0;...\")\n\n====================================================\nrefcount_t: addition on 0; use-after-free.\nWARNING: CPU: 1 PID: 20874 at lib/refcount.c:25 refcount_warn_saturate+0x169/0x1e0\nRIP: 0010:refcount_warn_saturate+0x169/0x1e0\nCall Trace:\n j1939_netdev_start+0x68b/0x920\n j1939_sk_bind+0x426/0xeb0\n ? security_socket_bind+0x83/0xb0\n\nThe rx_kref's kref_get() and kref_put() should use j1939_netdev_lock to\nprotect.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: can: j1939: j1939_netdev_start(): arreglar UAF para rx_kref de j1939_priv Activará UAF para rx_kref de j1939_priv de la siguiente manera. cpu0 cpu1 j1939_sk_bind(socket0, ndev0, ...) j1939_netdev_start j1939_sk_bind(socket1, ndev0, ...) j1939_netdev_start j1939_priv_set j1939_priv_get_by_ndev_locked j1939_jsk_add ..... kref_put_lock(&amp;priv-&gt;rx_kref, ...) kref_get(&amp;priv-&gt;rx_kref , ...) REFCOUNT_WARN(\"adición en 0;...\") ================================== ==================== refcount_t: suma en 0; use-after-free. ADVERTENCIA: CPU: 1 PID: 20874 en lib/refcount.c:25 refcount_warn_saturate+0x169/0x1e0 RIP: 0010:refcount_warn_saturate+0x169/0x1e0 Seguimiento de llamadas: j1939_netdev_start+0x68b/0x920 j1939_sk_bind+0x426 /0xeb0 ? security_socket_bind+0x83/0xb0 Los kref_get() y kref_put() de rx_kref deben usar j1939_netdev_lock para proteger.","source":"nvd"}],"published":"2024-05-22T06:23:21.061Z","modified":"2026-08-05T08:47:56.231Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"9d71dd0c70099914fcd063135da3c580865e924c","fixed":"a0e47d2833b4f65e6c799f28c6b636d36b8b936d","status":"affected"},{"type":"git","introduced":"9d71dd0c70099914fcd063135da3c580865e924c","fixed":"864e77771a24c877aaf53aee019f78619cbcd668","status":"affected"},{"type":"git","introduced":"9d71dd0c70099914fcd063135da3c580865e924c","fixed":"6e8811707e2df0c6ba920f0cad3a3bca7b42132f","status":"affected"},{"type":"git","introduced":"9d71dd0c70099914fcd063135da3c580865e924c","fixed":"d9d52a3ebd284882f5562c88e55991add5d01586","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.4","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.4","status":"unaffected"},{"type":"semver","introduced":"5.4.156","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.76","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.14.15","lastAffected":"5.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.4","fixed":"5.4.156"},{"status":"affected","introduced":"5.5","fixed":"5.10.76"},{"status":"affected","introduced":"5.11","fixed":"5.14.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a0e47d2833b4f65e6c799f28c6b636d36b8b936d","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/864e77771a24c877aaf53aee019f78619cbcd668","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6e8811707e2df0c6ba920f0cad3a3bca7b42132f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d9d52a3ebd284882f5562c88e55991add5d01586","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:36:14.848Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47459","url":"https://www.cve.org/CVERecord?id=CVE-2021-47459","licence":"CVE Terms of Use","modified":"2026-08-05T08:47:56.231Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47459","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47459","licence":"Public domain","modified":"2026-08-04T10:17:04.430Z"}],"updatedAt":"2026-11-25T22:58:08.868Z","epss":{"score":0.00226,"percentile":0.1426,"date":"2026-12-01T12:00:22.000Z"}}