# CVE-2024-42282: net: mediatek: Fix potential NULL pointer dereference in dummy net_device handling

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-02)
- Published: 2024-08-17T09:08:49.145Z
- Modified: 2026-10-03T11:17:30.883Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: mediatek: Fix potential NULL pointer dereference in dummy net_device handling

Move the freeing of the dummy net_device from mtk_free_dev() to
mtk_remove().

Previously, if alloc_netdev_dummy() failed in mtk_probe(),
eth->dummy_dev would be NULL. The error path would then call
mtk_free_dev(), which in turn called free_netdev() assuming dummy_dev
was allocated (but it was not), potentially causing a NULL pointer
dereference.

By moving free_netdev() to mtk_remove(), we ensure it's only called when
mtk_probe() has succeeded and dummy_dev is fully allocated. This
addresses a potential NULL pointer dereference detected by Smatch[1].

(As written by CVE List.)

## Affected

- Linux Linux: from d5d57501f543f48df8b76a4af59def9a894b396f before 81e82340170ae82f8cc28e76c13a0069c0d47cb4; from b209bd6d0bffb8991aba568e2d9a892c86a1a43c before af6bd5c9901b13a26eaf4d57d97a813297791596; from b209bd6d0bffb8991aba568e2d9a892c86a1a43c before 16f3a28cf5f876a7f3550d8f4c870a7b41bcfaef; 6.10 (not affected: before 6.10; from 6.10.3 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: from 6.10 before 6.10.3

## References

- <https://git.kernel.org/stable/c/81e82340170ae82f8cc28e76c13a0069c0d47cb4>
- <https://git.kernel.org/stable/c/af6bd5c9901b13a26eaf4d57d97a813297791596> (patch)
- <https://git.kernel.org/stable/c/16f3a28cf5f876a7f3550d8f4c870a7b41bcfaef> (patch)

## Sources

- CVE List: [CVE-2024-42282](https://www.cve.org/CVERecord?id=CVE-2024-42282), CVE Terms of Use, modified 2026-10-03
- NVD: [CVE-2024-42282](https://nvd.nist.gov/vuln/detail/CVE-2024-42282), Public domain, modified 2026-10-03

---

Page: https://cve.day/CVE-2024-42282 · Whole record: https://cve.day/CVE-2024-42282.json · Rebuilt by cve.day 2026-11-25T22:58:44.463Z
