CVE-2023-54240 net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()

Not scored Published Updated

A local attacker can cause a denial of service in the Linux kernel via a NULL pointer dereference in the MediaTek Ethernet driver.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-54240?

CVE-2023-54240 is a vulnerability in Linux, published on 30 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Which versions are affected by CVE-2023-54240?

How do I fix CVE-2023-54240?

Apply the vendor's patch.

Is CVE-2023-54240 being exploited?

There is no known exploitation of CVE-2023-54240 in the wild and no public exploit code.

Sources

Also known as BELL-CVE-2023-54240, DEBIAN-CVE-2023-54240, GHSA-74c5-8qvv-vrf8, UBUNTU-CVE-2023-54240.

Is CVE-2023-54240 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free