# CVE-2021-47556: ethtool: ioctl: fix potential NULL deref in ethtool_set_coalesce()

- 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.18%, higher than 8% of CVEs (2026-12-01)
- Published: 2024-05-24T15:09:57.983Z
- Modified: 2026-06-17T04:17:45.693Z
- 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:

ethtool: ioctl: fix potential NULL deref in ethtool_set_coalesce()

ethtool_set_coalesce() now uses both the .get_coalesce() and
.set_coalesce() callbacks. But the check for their availability is
buggy, so changing the coalesce settings on a device where the driver
provides only _one_ of the callbacks results in a NULL pointer
dereference instead of an -EOPNOTSUPP.

Fix the condition so that the availability of both callbacks is
ensured. This also matches the netlink code.

Note that reproducing this requires some effort - it only affects the
legacy ioctl path, and needs a specific combination of driver options:
- have .get_coalesce() and .coalesce_supported but no
 .set_coalesce(), or
- have .set_coalesce() but no .get_coalesce(). Here eg. ethtool doesn't
  cause the crash as it first attempts to call ethtool_get_coalesce()
  and bails out on error.

(As written by CVE List.)

## Affected

- Linux Linux: from f3ccfda1931977b80267ba54070a1aeafa18f6ca before abfdd9e2f0f9699015d72317f74154d3e53664e6; from f3ccfda1931977b80267ba54070a1aeafa18f6ca before 0276af2176c78771da7f311621a25d7608045827; 5.15 (not affected: before 5.15; from 5.15.6 up to 5.15.*; from 5.16 up to *)
- linux linux_kernel: from 5.15 before 5.15.6

## References

- <https://git.kernel.org/stable/c/abfdd9e2f0f9699015d72317f74154d3e53664e6> (patch)
- <https://git.kernel.org/stable/c/0276af2176c78771da7f311621a25d7608045827> (patch)

## Sources

- CVE List: [CVE-2021-47556](https://www.cve.org/CVERecord?id=CVE-2021-47556), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47556](https://nvd.nist.gov/vuln/detail/CVE-2021-47556), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47556 · Whole record: https://cve.day/CVE-2021-47556.json · Rebuilt by cve.day 2026-11-25T22:58:08.914Z
