can: j1939: make j1939_session_activate() fail if device is no longer registered (Linux Linux)

CVE-2025-71182
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.14 % · percentile 3 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: can: j1939: make j1939_session_activate() fail if device is no longer registered syzbot is still reporting unregister_netdevice: waiting for vcan0 to become free. Usage count = 2 even after commit 93a27b5891b8 ("can: j1939: add missing calls in NETDEV_UNREGISTER notification handler") was added. A debug printk() patch found that j1939_session_activate() can succeed even after j1939_cancel_active_session() from j1939_netdev_notify(NETDEV_UNREGISTER) has completed. Since j1939_cancel_active_session() is processed with the session list lock held, checking ndev->reg_state in j1939_session_activate() with the session list lock held can reliably close the race window.

Weaknesses (CWE)

  • CWE-362 — Concurrent Execution using Shared Resource with Improper Synchronization

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected 9d71dd0c70099914fcd063135da3c580865e924c < ebb0dfd718dd31c8d3600612ca4b7207ec3d923a ; affected 9d71dd0c70099914fcd063135da3c580865e924c < c3a4316e3c746af415c0fd6c6d489ad13f53714d ; affected 9d71dd0c70099914fcd063135da3c580865e924c < 46ca9dc978923c5e1247a9e9519240ba7ace413c ; affected 9d71dd0c70099914fcd063135da3c580865e924c < 78d87b72cebe2a993fd5b017e9f14fb6278f2eae ; affected 9d71dd0c70099914fcd063135da3c580865e924c < ba6f0d1832eeb5eb3a6dc5cb30e0f720b3cb3536 ; affected 9d71dd0c70099914fcd063135da3c580865e924c < 79dd3f1d9dd310c2af89b09c71f34d93973b200f
Linux · Linuxaffected 5.4 ; unaffected 0 < 5.4 ; unaffected 5.10.248 ≤ 5.10.* ; unaffected 5.15.198 ≤ 5.15.* ; unaffected 6.1.161 ≤ 6.1.* ; unaffected 6.6.121 ≤ 6.6.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD