CVE-2021-4454
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
27/03/2025
Last modified:
28/03/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
can: j1939: fix errant WARN_ON_ONCE in j1939_session_deactivate<br />
<br />
The conclusion "j1939_session_deactivate() should be called with a<br />
session ref-count of at least 2" is incorrect. In some concurrent<br />
scenarios, j1939_session_deactivate can be called with the session<br />
ref-count less than 2. But there is not any problem because it<br />
will check the session active state before session putting in<br />
j1939_session_deactivate_locked().<br />
<br />
Here is the concurrent scenario of the problem reported by syzbot<br />
and my reproduction log.<br />
<br />
cpu0 cpu1<br />
j1939_xtp_rx_eoma<br />
j1939_xtp_rx_abort_one<br />
j1939_session_get_by_addr [kref == 2]<br />
j1939_session_get_by_addr [kref == 3]<br />
j1939_session_deactivate [kref == 2]<br />
j1939_session_put [kref == 1]<br />
j1939_session_completed<br />
j1939_session_deactivate<br />
WARN_ON_ONCE(kref
Impact
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/1740a1e45eee65099a92fb502e1e67e63aad277d
- https://git.kernel.org/stable/c/6950df42a03c9ac9290503ced3f371199cb68fa9
- https://git.kernel.org/stable/c/9ab896775f98ff54b68512f345eed178bf961084
- https://git.kernel.org/stable/c/b6d44072117bba057d50f7a2f96e5d070c65926d
- https://git.kernel.org/stable/c/d0553680f94c49bbe0e39eb50d033ba563b4212d