# CVE-2022-49721: arm64: ftrace: consistently handle PLTs.

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **Published:** 2025-02-26T02:24:34.685Z
- **Modified:** 2026-06-17T05:18:57.920Z

## Who should check

- Anyone running Linux \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< bc28fde90937a920f7714ec4408269cac744f796; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< db73aa9466338ec821ed2a0b01721fe4d06876b1; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< dcecc96ed16f73417de5550f384e348c9d56f279; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< a6253579977e4c6f7818eeb05bf2bc65678a7187
- Anyone running Linux 5.5

## Description

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

arm64: ftrace: consistently handle PLTs.

Sometimes it is necessary to use a PLT entry to call an ftrace
trampoline. This is handled by ftrace\_make\_call() and ftrace\_make\_nop(),
with each having \*almost\* identical logic, but this is not handled by
ftrace\_modify\_call() since its introduction in commit:

  3b23e4991fb66f6d ("arm64: implement ftrace with regs")

Due to this, if we ever were to call ftrace\_modify\_call() for a callsite
which requires a PLT entry for a trampoline, then either:

a) If the old addr requires a trampoline, ftrace\_modify\_call() will use
   an out-of-range address to generate the 'old' branch instruction.
   This will result in warnings from aarch64\_insn\_gen\_branch\_imm() and
   ftrace\_modify\_code(), and no instructions will be modified. As
   ftrace\_modify\_call() will return an error, this will result in
   subsequent internal ftrace errors.

b) If the old addr does not require a trampoline, but the new addr does,
   ftrace\_modify\_call() will use an out-of-range address to generate the
   'new' branch instruction. This will result in warnings from
   aarch64\_insn\_gen\_branch\_imm(), and ftrace\_modify\_code() will replace
   the 'old' branch with a BRK. This will result in a kernel panic when
   this BRK is later executed.

Practically speaking, case (a) is vastly more likely than case (b), and
typically this will result in internal ftrace errors that don't
necessarily affect the rest of the system. This can be demonstrated with
an out-of-tree test module which triggers ftrace\_modify\_call(), e.g.

\| \# insmod test\_ftrace.ko
\| test\_ftrace: Function test\_function raw=0xffffb3749399201c, callsite=0xffffb37493992024
\| branch\_imm\_common: offset out of range
\| branch\_imm\_common: offset out of range
\| ------------\[ ftrace bug \]------------
\| ftrace failed to modify
\| \[\<ffffb37493992024\>\] test\_function+0x8/0x38 \[test\_ftrace\]
\|  actual:   1d:00:00:94
\| Updating ftrace call site to call a different ftrace function
\| ftrace record flags: e0000002
\|  (2) R
\|  expected tramp: ffffb374ae42ed54
\| ------------\[ cut here \]------------
\| WARNING: CPU: 0 PID: 165 at kernel/trace/ftrace.c:2085 ftrace\_bug+0x280/0x2b0
\| Modules linked in: test\_ftrace(+)
\| CPU: 0 PID: 165 Comm: insmod Not tainted 5.19.0-rc2-00002-g4d9ead8b45ce \#13
\| Hardware name: linux,dummy-virt (DT)
\| pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
\| pc : ftrace\_bug+0x280/0x2b0
\| lr : ftrace\_bug+0x280/0x2b0
\| sp : ffff80000839ba00
\| x29: ffff80000839ba00 x28: 0000000000000000 x27: ffff80000839bcf0
\| x26: ffffb37493994180 x25: ffffb374b0991c28 x24: ffffb374b0d70000
\| x23: 00000000ffffffea x22: ffffb374afcc33b0 x21: ffffb374b08f9cc8
\| x20: ffff572b8462c000 x19: ffffb374b08f9000 x18: ffffffffffffffff
\| x17: 6c6c6163202c6331 x16: ffffb374ae5ad110 x15: ffffb374b0d51ee4
\| x14: 0000000000000000 x13: 3435646532346561 x12: 3437336266666666
\| x11: 203a706d61727420 x10: 6465746365707865 x9 : ffffb374ae5149e8
\| x8 : 336266666666203a x7 : 706d617274206465 x6 : 00000000fffff167
\| x5 : ffff572bffbc4a08 x4 : 00000000fffff167 x3 : 0000000000000000
\| x2 : 0000000000000000 x1 : ffff572b84461e00 x0 : 0000000000000022
\| Call trace:
\|  ftrace\_bug+0x280/0x2b0
\|  ftrace\_replace\_code+0x98/0xa0
\|  ftrace\_modify\_all\_code+0xe0/0x144
\|  arch\_ftrace\_update\_code+0x14/0x20
\|  ftrace\_startup+0xf8/0x1b0
\|  register\_ftrace\_function+0x38/0x90
\|  test\_ftrace\_init+0xd0/0x1000 \[test\_ftrace\]
\|  do\_one\_initcall+0x50/0x2b0
\|  do\_init\_module+0x50/0x1f0
\|  load\_module+0x17c8/0x1d64
\|  \_\_do\_sys\_finit\_module+0xa8/0x100
\|  \_\_arm64\_sys\_finit\_module+0x2c/0x3c
\|  invoke\_syscall+0x50/0x120
\|  el0\_svc\_common.constprop.0+0xdc/0x100
\|  do\_el0\_svc+0x3c/0xd0
\|  el0\_svc+0x34/0xb0
\|  el0t\_64\_sync\_handler+0xbc/0x140
\|  el0t\_64\_sync+0x18c/0x190
\| ---\[ end trace 0000000000000000 \]---

We can solve this by consistently determining whether to use a PLT entry
for an address.

Note that since (the earlier) commit:

  f1a54ae9
---truncated---

## Affected and fixed versions

- Linux: \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< bc28fde90937a920f7714ec4408269cac744f796; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< db73aa9466338ec821ed2a0b01721fe4d06876b1; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< dcecc96ed16f73417de5550f384e348c9d56f279; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< a6253579977e4c6f7818eeb05bf2bc65678a7187 (cvelist)
- Linux: 5.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49721. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49721.md
Affected: Linux >= 3b23e4991fb66f6d152f9055ede271a726ef9f21, < bc28fde90937a920f7714ec4408269cac744f796; >= 3b23e4991fb66f6d152f9055ede271a726ef9f21, < db73aa9466338ec821ed2a0b01721fe4d06876b1; >= 3b23e4991fb66f6d152f9055ede271a726ef9f21, < dcecc96ed16f73417de5550f384e348c9d56f279; >= 3b23e4991fb66f6d152f905…
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49721 being exploited?

There is no confirmed exploitation: CVE-2022-49721 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49721?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49721?

Linux \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< bc28fde90937a920f7714ec4408269cac744f796; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< db73aa9466338ec821ed2a0b01721fe4d06876b1; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< dcecc96ed16f73417de5550f384e348c9d56f279; \>= 3b23e4991fb66f6d152f9055ede271a726ef9f21, \< a6253579977e4c6f7818eeb05bf2bc65678a7187; Linux 5.5.

### Is there a fix for CVE-2022-49721?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-49721?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/bc28fde90937a920f7714ec4408269cac744f796>
- patch: <https://git.kernel.org/stable/c/db73aa9466338ec821ed2a0b01721fe4d06876b1>
- patch: <https://git.kernel.org/stable/c/dcecc96ed16f73417de5550f384e348c9d56f279>
- patch: <https://git.kernel.org/stable/c/a6253579977e4c6f7818eeb05bf2bc65678a7187>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49721>

HTML: <https://flawdb.com/CVE-2022-49721> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49721>
