CVE-2022-49878
bpf, verifier: Fix memory leak in array reallocation for stack state
Mitigation
- Upgrade Linux to 42378a9ca55347102bbf86708776061d8fe3ece2 or later.
Who should check
- Anyone running Linux >= c69431aab67a912836e5831f03d99a819c14c9c3, < 06615967d4889b08b19ff3dda96e8b131282f73d; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 3e210891c4a4c2d858cd6f9f61d5809af251d4df; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 42378a9ca55347102bbf86708776061d8fe3ece2
- Anyone running Linux 5.14
Vulnerability facts
- Affected
- Linux >= c69431aab67a912836e5831f03d99a819c14c9c3, < 06615967d4889b08b19ff3dda96e8b131282f73d; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 3e210891c4a4c2d858cd6f9f61d5809af251d4df; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 42378a9ca55347102bbf86708776061d8fe3ece2; Linux 5.14
- Fixed in
- Linux 06615967d4889b08b19ff3dda96e8b131282f73d, Linux 3e210891c4a4c2d858cd6f9f61d5809af251d4df, Linux 42378a9ca55347102bbf86708776061d8fe3ece2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 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
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
- CWE
- CWE-401
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: bpf, verifier: Fix memory leak in array reallocation for stack state If an error (NULL) is returned by krealloc(), callers of realloc_array() were setting their allocation pointers to NULL, but on error krealloc() does not touch the original allocation. This would result in a memory resource leak. Instead, free the old allocation on the error handling path. The memory leak information is as follows as also reported by Zhengchao: unreferenced object 0xffff888019801800 (size 256): comm "bpf_repo", pid 6490, jiffies 4294959200 (age 17.170s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000b211474b>] __kmalloc_node_track_caller+0x45/0xc0 [<0000000086712a0b>] krealloc+0x83/0xd0 [<00000000139aab02>] realloc_array+0x82/0xe2 [<00000000b1ca41d1>] grow_stack_state+0xfb/0x186 [<00000000cd6f36d2>] check_mem_access.cold+0x141/0x1341 [<0000000081780455>] do_check_common+0x5358/0xb350 [<0000000015f6b091>] bpf_check.cold+0xc3/0x29d [<000000002973c690>] bpf_prog_load+0x13db/0x2240 [<00000000028d1644>] __sys_bpf+0x1605/0x4ce0 [<00000000053f29bd>] __x64_sys_bpf+0x75/0xb0 [<0000000056fedaf5>] do_syscall_64+0x35/0x80 [<000000002bd58261>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= c69431aab67a912836e5831f03d99a819c14c9c3, < 06615967d4889b08b19ff3dda96e8b131282f73d; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 3e210891c4a4c2d858cd6f9f61d5809af251d4df; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 42378a9ca55347102bbf86708776061d8fe3ece2 | — | cvelist |
| Linux | 5.14 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-49878. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-49878.md Affected: Linux >= c69431aab67a912836e5831f03d99a819c14c9c3, < 06615967d4889b08b19ff3dda96e8b131282f73d; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 3e210891c4a4c2d858cd6f9f61d5809af251d4df; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 42378a9ca55347102bbf86708776061d8fe3ece2; Linux 5.14 Fixed in: Linux 06615967d4889b08b19ff3dda96e8b131282f73d, Linux 3e210891c4a4c2d858cd6f9f61d5809af251d4df, Linux 42378a9ca55347102bbf86708776061d8fe3ece2 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.
References
FAQ
Is CVE-2022-49878 being exploited?
There is no confirmed exploitation: CVE-2022-49878 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-49878?
Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2022-49878?
Linux >= c69431aab67a912836e5831f03d99a819c14c9c3, < 06615967d4889b08b19ff3dda96e8b131282f73d; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 3e210891c4a4c2d858cd6f9f61d5809af251d4df; >= c69431aab67a912836e5831f03d99a819c14c9c3, < 42378a9ca55347102bbf86708776061d8fe3ece2; Linux 5.14.
Is there a fix for CVE-2022-49878?
Yes. Fixed in Linux 06615967d4889b08b19ff3dda96e8b131282f73d, Linux 3e210891c4a4c2d858cd6f9f61d5809af251d4df, Linux 42378a9ca55347102bbf86708776061d8fe3ece2. Upgrade Linux to 42378a9ca55347102bbf86708776061d8fe3ece2 or later.
How do I check if I'm affected by CVE-2022-49878?
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.