# CVE-2022-49341: bpf, arm64: Clear prog-\>jited\_len along prog-\>jited

> 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.29% (percentile 14, 2026-11-26)
- **Published:** 2025-02-26T02:10:58.118Z
- **Modified:** 2026-11-05T20:17:03.830Z

## Who should check

- Anyone running Linux \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< aaf61a312af63e1cfe2264c4c5b8cd4ea3626025; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< e412b3d178ea4bf746f6b8ee086761613704c6be; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 0cf7aaff290cdc4d7cee683d4a18138b0dacac48; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 3f4d5e727aeaa610688d46c9f101f78b7f712583; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 5c25a3040bc0486c41a7b63a1fb0de7cdb846ad7; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 41f7c4f85d402043687e863627a1a84fa867c62d; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 10f3b29c65bb2fe0d47c2945cd0b4087be1c5218
- Anyone running Linux 4.16

## Description

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

bpf, arm64: Clear prog-\>jited\_len along prog-\>jited

syzbot reported an illegal copy\_to\_user() attempt
from bpf\_prog\_get\_info\_by\_fd() \[1\]

There was no repro yet on this bug, but I think
that commit 0aef499f3172 ("mm/usercopy: Detect vmalloc overruns")
is exposing a prior bug in bpf arm64.

bpf\_prog\_get\_info\_by\_fd() looks at prog-\>jited\_len
to determine if the JIT image can be copied out to user space.

My theory is that syzbot managed to get a prog where prog-\>jited\_len
has been set to 43, while prog-\>bpf\_func has ben cleared.

It is not clear why copy\_to\_user(uinsns, NULL, ulen) is triggering
this particular warning.

I thought find\_vma\_area(NULL) would not find a vm\_struct.
As we do not hold vmap\_area\_lock spinlock, it might be possible
that the found vm\_struct was garbage.

\[1\]
usercopy: Kernel memory exposure attempt detected from vmalloc (offset 792633534417210172, size 43)!
kernel BUG at mm/usercopy.c:101!
Internal error: Oops - BUG: 0 \[\#1\] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 25002 Comm: syz-executor.1 Not tainted 5.18.0-syzkaller-10139-g8291eaafed36 \#0
Hardware name: linux,dummy-virt (DT)
pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : usercopy\_abort+0x90/0x94 mm/usercopy.c:101
lr : usercopy\_abort+0x90/0x94 mm/usercopy.c:89
sp : ffff80000b773a20
x29: ffff80000b773a30 x28: faff80000b745000 x27: ffff80000b773b48
x26: 0000000000000000 x25: 000000000000002b x24: 0000000000000000
x23: 00000000000000e0 x22: ffff80000b75db67 x21: 0000000000000001
x20: 000000000000002b x19: ffff80000b75db3c x18: 00000000fffffffd
x17: 2820636f6c6c616d x16: 76206d6f72662064 x15: 6574636574656420
x14: 74706d6574746120 x13: 2129333420657a69 x12: 73202c3237313031
x11: 3237313434333533 x10: 3336323937207465 x9 : 657275736f707865
x8 : ffff80000a30c550 x7 : ffff80000b773830 x6 : ffff80000b773830
x5 : 0000000000000000 x4 : ffff00007fbbaa10 x3 : 0000000000000000
x2 : 0000000000000000 x1 : f7ff000028fc0000 x0 : 0000000000000064
Call trace:
 usercopy\_abort+0x90/0x94 mm/usercopy.c:89
 check\_heap\_object mm/usercopy.c:186 \[inline\]
 \_\_check\_object\_size mm/usercopy.c:252 \[inline\]
 \_\_check\_object\_size+0x198/0x36c mm/usercopy.c:214
 check\_object\_size include/linux/thread\_info.h:199 \[inline\]
 check\_copy\_size include/linux/thread\_info.h:235 \[inline\]
 copy\_to\_user include/linux/uaccess.h:159 \[inline\]
 bpf\_prog\_get\_info\_by\_fd.isra.0+0xf14/0xfdc kernel/bpf/syscall.c:3993
 bpf\_obj\_get\_info\_by\_fd+0x12c/0x510 kernel/bpf/syscall.c:4253
 \_\_sys\_bpf+0x900/0x2150 kernel/bpf/syscall.c:4956
 \_\_do\_sys\_bpf kernel/bpf/syscall.c:5021 \[inline\]
 \_\_se\_sys\_bpf kernel/bpf/syscall.c:5019 \[inline\]
 \_\_arm64\_sys\_bpf+0x28/0x40 kernel/bpf/syscall.c:5019
 \_\_invoke\_syscall arch/arm64/kernel/syscall.c:38 \[inline\]
 invoke\_syscall+0x48/0x114 arch/arm64/kernel/syscall.c:52
 el0\_svc\_common.constprop.0+0x44/0xec arch/arm64/kernel/syscall.c:142
 do\_el0\_svc+0xa0/0xc0 arch/arm64/kernel/syscall.c:206
 el0\_svc+0x44/0xb0 arch/arm64/kernel/entry-common.c:624
 el0t\_64\_sync\_handler+0x1ac/0x1b0 arch/arm64/kernel/entry-common.c:642
 el0t\_64\_sync+0x198/0x19c arch/arm64/kernel/entry.S:581
Code: aa0003e3 d00038c0 91248000 97fff65f (d4210000)

## Affected and fixed versions

- Linux: \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< aaf61a312af63e1cfe2264c4c5b8cd4ea3626025; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< e412b3d178ea4bf746f6b8ee086761613704c6be; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 0cf7aaff290cdc4d7cee683d4a18138b0dacac48; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 3f4d5e727aeaa610688d46c9f101f78b7f712583; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 5c25a3040bc0486c41a7b63a1fb0de7cdb846ad7; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 41f7c4f85d402043687e863627a1a84fa867c62d; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 10f3b29c65bb2fe0d47c2945cd0b4087be1c5218 (cvelist)
- Linux: 4.16 (cvelist)

## Mitigation

- Upgrade Linux to 10f3b29c65bb2fe0d47c2945cd0b4087be1c5218 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49341.md
Affected: Linux >= db496944fdaaf2a67d2f60529f5dc23abf809506, < aaf61a312af63e1cfe2264c4c5b8cd4ea3626025; >= db496944fdaaf2a67d2f60529f5dc23abf809506, < e412b3d178ea4bf746f6b8ee086761613704c6be; >= db496944fdaaf2a67d2f60529f5dc23abf809506, < 0cf7aaff290cdc4d7cee683d4a18138b0dacac48; >= db496944fdaaf2a67d2f605…
Fixed in: Linux 0cf7aaff290cdc4d7cee683d4a18138b0dacac48, Linux 3f4d5e727aeaa610688d46c9f101f78b7f712583, Linux 5c25a3040bc0486c41a7b63a1fb0de7cdb846ad7, Linux 41f7c4f85d402043687e863627a1a84fa867c62d, Linux 10f3b29c65bb2fe0d47c2945cd0b4087be1c5218

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-49341 being exploited?

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

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

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

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

Linux \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< aaf61a312af63e1cfe2264c4c5b8cd4ea3626025; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< e412b3d178ea4bf746f6b8ee086761613704c6be; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 0cf7aaff290cdc4d7cee683d4a18138b0dacac48; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 3f4d5e727aeaa610688d46c9f101f78b7f712583; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 5c25a3040bc0486c41a7b63a1fb0de7cdb846ad7; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 41f7c4f85d402043687e863627a1a84fa867c62d; \>= db496944fdaaf2a67d2f60529f5dc23abf809506, \< 10f3b29c65bb2fe0d47c2945cd0b4087be1c5218; Linux 4.16.

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

Yes. Fixed in Linux 0cf7aaff290cdc4d7cee683d4a18138b0dacac48, Linux 3f4d5e727aeaa610688d46c9f101f78b7f712583, Linux 5c25a3040bc0486c41a7b63a1fb0de7cdb846ad7, Linux 41f7c4f85d402043687e863627a1a84fa867c62d, Linux 10f3b29c65bb2fe0d47c2945cd0b4087be1c5218. Upgrade Linux to 10f3b29c65bb2fe0d47c2945cd0b4087be1c5218 or later.

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

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/aaf61a312af63e1cfe2264c4c5b8cd4ea3626025>
- patch: <https://git.kernel.org/stable/c/e412b3d178ea4bf746f6b8ee086761613704c6be>
- patch: <https://git.kernel.org/stable/c/0cf7aaff290cdc4d7cee683d4a18138b0dacac48>
- patch: <https://git.kernel.org/stable/c/3f4d5e727aeaa610688d46c9f101f78b7f712583>
- patch: <https://git.kernel.org/stable/c/5c25a3040bc0486c41a7b63a1fb0de7cdb846ad7>
- patch: <https://git.kernel.org/stable/c/41f7c4f85d402043687e863627a1a84fa867c62d>
- patch: <https://git.kernel.org/stable/c/10f3b29c65bb2fe0d47c2945cd0b4087be1c5218>

## 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-49341>

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