CVE-2023-54240
Description
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()
rule_locs is allocated in ethtool_get_rxnfc and the size is determined by rule_cnt from user space. So rule_cnt needs to be check before using rule_locs to avoid NULL pointer dereference.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel's mtk_eth_soc driver, a missing check on user-supplied rule_cnt can cause a NULL pointer dereference in mtk_hwlro_get_fdir_all().
Vulnerability
CVE-2023-54240 is a NULL pointer dereference vulnerability in the Linux kernel's MediaTek Ethernet driver (mtk_eth_soc). The flaw resides in the mtk_hwlro_get_fdir_all() function, which is called during the ethtool_get_rxnfc operation. The function uses a buffer (rule_locs) whose size is determined by the rule_cnt value provided from user space. If rule_cnt is zero or otherwise invalid, the allocation may be skipped or insufficient, leading to a NULL pointer dereference when the function when the code attempts to use rule_locs without first verifying that rule_cnt is valid [1][2][3].
Exploitation
An attacker with local access and the ability to issue ethtool commands (specifically ETHTOOL_GRXCLSRLALL or similar) can trigger this vulnerability. No special privileges beyond the ability to call the affected ioctl are required, though the attacker must have access to a network interface using the mtk_eth_soc driver. The attack surface is limited to systems with MediaTek Ethernet hardware and the corresponding kernel driver loaded.
Impact
Successful exploitation results in a kernel NULL pointer dereference, which typically causes a system crash (denial of service). In some configurations, this could potentially be leveraged for privilege escalation, but the primary impact is a denial-of-service condition on the affected system.
Mitigation
The fix has been applied in the Linux kernel stable tree via commits [1], [2], and [3]. Users should update their kernel to a version containing the patch. No workaround is available other than applying the kernel update.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
87776591e5ae2751b2e22a188653fbddbdfc675f2de75c118072324cfab9bff5faed5f548fe0195fe48f8e4c79810755fVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/072324cfab9b96071c0782f51f53cc5aea1e9d5bnvd
- git.kernel.org/stable/c/653fbddbdfc6673bba01b13dae5a4384ad8f92ecnvd
- git.kernel.org/stable/c/751b2e22a188b0c306029d094da29b6b8de31430nvd
- git.kernel.org/stable/c/75f2de75c1182e80708c932418e4895dbc88b68fnvd
- git.kernel.org/stable/c/7776591e5ae2befff86579f68916a171971c6aabnvd
- git.kernel.org/stable/c/e4c79810755f66c9a933ca810da2724133b1165anvd
- git.kernel.org/stable/c/fe0195fe48f85182bc7e7eabcad925bd3cbc10f5nvd
- git.kernel.org/stable/c/ff5faed5f5487b0fd2b640ba1304f82a5ebaab42nvd
News mentions
0No linked articles in our index yet.