# CVE-2021-47276: ftrace: Do not blindly read the ip address in ftrace_bug()

- 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.24%, higher than 15% of CVEs (2026-12-01)
- Published: 2024-05-21T14:20:04.023Z
- Modified: 2026-06-17T04:17:05.013Z
- Weaknesses: CWE-706
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

ftrace: Do not blindly read the ip address in ftrace_bug()

It was reported that a bug on arm64 caused a bad ip address to be used for
updating into a nop in ftrace_init(), but the error path (rightfully)
returned -EINVAL and not -EFAULT, as the bug caused more than one error to
occur. But because -EINVAL was returned, the ftrace_bug() tried to report
what was at the location of the ip address, and read it directly. This
caused the machine to panic, as the ip was not pointing to a valid memory
address.

Instead, read the ip address with copy_from_kernel_nofault() to safely
access the memory, and if it faults, report that the address faulted,
otherwise report what was in that location.

(As written by CVE List.)

## Affected

- Linux Linux: from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before 0bc62e398bbd9e600959e610def5109957437b28; from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before 4aedc2bc2b32c93555f47c95610efb89cc1ec09b; from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before acf671ba79c1feccc3ec7cfdcffead4efcec49e7; from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before 862dcc14f2803c556bdd73b43c27b023fafce2fb; from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before 7e4e824b109f1d41ccf223fbb0565d877d6223a2; from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before 97524384762c1fb9b3ded931498dd2047bd0de81; from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before 3e4ddeb68751fb4fb657199aed9cfd5d02796875; from 05736a427f7e16be948ccbf39782bd3a6ae16b14 before 6c14133d2d3f768e0a35128faac8aa6ed4815051; 2.6.28 (not affected: before 2.6.28; from 4.4.273 up to 4.4.*; from 4.9.273 up to 4.9.*; from 4.14.237 up to 4.14.*; from 4.19.195 up to 4.19.*; from 5.4.126 up to 5.4.*; from 5.10.44 up to 5.10.*; from 5.12.11 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 2.6.28 before 4.4.273; from 4.5 before 4.9.273; from 4.10 before 4.14.237; from 4.15 before 4.19.195; from 4.20 before 5.4.126; from 5.5 before 5.10.44; from 5.11 before 5.12.11; 5.13

## References

- <https://git.kernel.org/stable/c/0bc62e398bbd9e600959e610def5109957437b28> (patch)
- <https://git.kernel.org/stable/c/4aedc2bc2b32c93555f47c95610efb89cc1ec09b> (patch)
- <https://git.kernel.org/stable/c/acf671ba79c1feccc3ec7cfdcffead4efcec49e7> (patch)
- <https://git.kernel.org/stable/c/862dcc14f2803c556bdd73b43c27b023fafce2fb> (patch)
- <https://git.kernel.org/stable/c/7e4e824b109f1d41ccf223fbb0565d877d6223a2> (patch)
- <https://git.kernel.org/stable/c/97524384762c1fb9b3ded931498dd2047bd0de81> (patch)
- <https://git.kernel.org/stable/c/3e4ddeb68751fb4fb657199aed9cfd5d02796875> (patch)
- <https://git.kernel.org/stable/c/6c14133d2d3f768e0a35128faac8aa6ed4815051> (patch)

## Sources

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

---

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