Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2022-49840

HIGH 7.8EPSS 15%

bpf, test_run: Fix alignment problem in bpf_prog_test_run_skb()

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running Linux >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 047824a730699c6c66df43306b80f700c9dfc2fd; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 730fb1ef974a13915bc7651364d8b3318891cd70; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 7a704dbfd3735304e261f2787c52fbc7c3884736; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < e60f37a1d379c821c17b08f366412dce9ef3d99f; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < eaa8edd86514afac9deb9bf9a5053e74f37edf40; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 1b597f2d6a55e9f549989913860ad5170da04964; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < d3fd203f36d46aa29600a72d57a1b61af80e4a25
  • Anyone running Linux 4.12

Vulnerability facts

Affected
Linux >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 047824a730699c6c66df43306b80f700c9dfc2fd; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 730fb1ef974a13915bc7651364d8b3318891cd70; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 7a704dbfd3735304e261f2787c52fbc7c3884736; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < e60f37a1d379c821c17b08f366412dce9ef3d99f; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < eaa8edd86514afac9deb9bf9a5053e74f37edf40; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 1b597f2d6a55e9f549989913860ad5170da04964; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < d3fd203f36d46aa29600a72d57a1b61af80e4a25; Linux 4.12
Fixed in
Linux 047824a730699c6c66df43306b80f700c9dfc2fd, Linux 730fb1ef974a13915bc7651364d8b3318891cd70, Linux 7a704dbfd3735304e261f2787c52fbc7c3884736, Linux 1b597f2d6a55e9f549989913860ad5170da04964
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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: High
  • Integrity impact: High
  • Availability impact: High
EPSS
0.30% chance of exploitation in 30 days (percentile 15, 2026-11-26)
CWE
CWE-416
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: bpf, test_run: Fix alignment problem in bpf_prog_test_run_skb() We got a syzkaller problem because of aarch64 alignment fault if KFENCE enabled. When the size from user bpf program is an odd number, like 399, 407, etc, it will cause the struct skb_shared_info's unaligned access. As seen below: BUG: KFENCE: use-after-free read in __skb_clone+0x23c/0x2a0 net/core/skbuff.c:1032 Use-after-free read at 0xffff6254fffac077 (in kfence-#213): __lse_atomic_add arch/arm64/include/asm/atomic_lse.h:26 [inline] arch_atomic_add arch/arm64/include/asm/atomic.h:28 [inline] arch_atomic_inc include/linux/atomic-arch-fallback.h:270 [inline] atomic_inc include/asm-generic/atomic-instrumented.h:241 [inline] __skb_clone+0x23c/0x2a0 net/core/skbuff.c:1032 skb_clone+0xf4/0x214 net/core/skbuff.c:1481 ____bpf_clone_redirect net/core/filter.c:2433 [inline] bpf_clone_redirect+0x78/0x1c0 net/core/filter.c:2420 bpf_prog_d3839dd9068ceb51+0x80/0x330 bpf_dispatcher_nop_func include/linux/bpf.h:728 [inline] bpf_test_run+0x3c0/0x6c0 net/bpf/test_run.c:53 bpf_prog_test_run_skb+0x638/0xa7c net/bpf/test_run.c:594 bpf_prog_test_run kernel/bpf/syscall.c:3148 [inline] __do_sys_bpf kernel/bpf/syscall.c:4441 [inline] __se_sys_bpf+0xad0/0x1634 kernel/bpf/syscall.c:4381 kfence-#213: 0xffff6254fffac000-0xffff6254fffac196, size=407, cache=kmalloc-512 allocated by task 15074 on cpu 0 at 1342.585390s: kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:675 [inline] bpf_test_init.isra.0+0xac/0x290 net/bpf/test_run.c:191 bpf_prog_test_run_skb+0x11c/0xa7c net/bpf/test_run.c:512 bpf_prog_test_run kernel/bpf/syscall.c:3148 [inline] __do_sys_bpf kernel/bpf/syscall.c:4441 [inline] __se_sys_bpf+0xad0/0x1634 kernel/bpf/syscall.c:4381 __arm64_sys_bpf+0x50/0x60 kernel/bpf/syscall.c:4381 To fix the problem, we adjust @size so that (@size + @hearoom) is a multiple of SMP_CACHE_BYTES. So we make sure the struct skb_shared_info is aligned to a cache line.

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 047824a730699c6c66df43306b80f700c9dfc2fd; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 730fb1ef974a13915bc7651364d8b3318891cd70; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 7a704dbfd3735304e261f2787c52fbc7c3884736; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < e60f37a1d379c821c17b08f366412dce9ef3d99f; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < eaa8edd86514afac9deb9bf9a5053e74f37edf40; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 1b597f2d6a55e9f549989913860ad5170da04964; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < d3fd203f36d46aa29600a72d57a1b61af80e4a25—cvelist
Linux4.12—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-49840. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49840.md
Affected: Linux >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 047824a730699c6c66df43306b80f700c9dfc2fd; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 730fb1ef974a13915bc7651364d8b3318891cd70; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 7a704dbfd3735304e261f2787c52fbc7c3884736; >= 1cf1cae963c2e6032aebe16…
Fixed in: Linux 047824a730699c6c66df43306b80f700c9dfc2fd, Linux 730fb1ef974a13915bc7651364d8b3318891cd70, Linux 7a704dbfd3735304e261f2787c52fbc7c3884736, Linux 1b597f2d6a55e9f549989913860ad5170da04964

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

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

How serious is CVE-2022-49840?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2022-49840?

Linux >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 047824a730699c6c66df43306b80f700c9dfc2fd; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 730fb1ef974a13915bc7651364d8b3318891cd70; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 7a704dbfd3735304e261f2787c52fbc7c3884736; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < e60f37a1d379c821c17b08f366412dce9ef3d99f; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < eaa8edd86514afac9deb9bf9a5053e74f37edf40; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < 1b597f2d6a55e9f549989913860ad5170da04964; >= 1cf1cae963c2e6032aebe1637e995bc2f5d330f4, < d3fd203f36d46aa29600a72d57a1b61af80e4a25; Linux 4.12.

Is there a fix for CVE-2022-49840?

Yes. Fixed in Linux 047824a730699c6c66df43306b80f700c9dfc2fd, Linux 730fb1ef974a13915bc7651364d8b3318891cd70, Linux 7a704dbfd3735304e261f2787c52fbc7c3884736, Linux 1b597f2d6a55e9f549989913860ad5170da04964. No fix listed yet: follow the vendor advisory.

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

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.

Sponsors