CVE-2024-42224

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
30/07/2024
Last modified:
03/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> net: dsa: mv88e6xxx: Correct check for empty list<br /> <br /> Since commit a3c53be55c95 ("net: dsa: mv88e6xxx: Support multiple MDIO<br /> busses") mv88e6xxx_default_mdio_bus() has checked that the<br /> return value of list_first_entry() is non-NULL.<br /> <br /> This appears to be intended to guard against the list chip-&gt;mdios being<br /> empty. However, it is not the correct check as the implementation of<br /> list_first_entry is not designed to return NULL for empty lists.<br /> <br /> Instead, use list_first_entry_or_null() which does return NULL if the<br /> list is empty.<br /> <br /> Flagged by Smatch.<br /> Compile tested only.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.11 (including) 4.19.318 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.280 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.222 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.163 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.98 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.39 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.9.9 (excluding)