CVE-2022-49552 bpf: Fix combination of jit blinding and pointers to bpf subprogs.

Medium 5.5 Published Updated

A flaw in Linux kernel BPF JIT blinding allows attackers to trigger a page fault and potential code execution via crafted BPF programs.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-49552?

CVE-2022-49552 is a medium-severity memory corruption vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

bpf: Fix combination of jit blinding and pointers to bpf subprogs.

The combination of jit blinding and pointers to bpf subprogs causes: [ 36.989548] BUG: unable to handle page fault for address: 0000000100000001 [ 36.990342] #PF: supervisor instruction fetch in kernel mode [ 36.990968] #PF: error_code(0x0010) - not-present page [ 36.994859] RIP: 0010:0x100000001 [ 36.995209] Code: Unable to access opcode bytes at RIP 0xffffffd7. [ 37.004091] Call Trace: [ 37.004351] <TASK> [ 37.004576] ? bpf_loop+0x4d/0x70 [ 37.004932] ? bpf_prog_3899083f75e4c5de_F+0xe3/0x13b

The jit blinding logic didn't recognize that ld_imm64 with an address of bpf subprogram is a special instruction and proceeded to randomize it. By itself it wouldn't have been an issue, but jit_subprogs() logic relies on two step process to JIT all subprogs and then JIT them again when addresses of all subprogs are known. Blinding process in the first JIT phase caused second JIT to miss adjustment of special ld_imm64.

Fix this issue by ignoring special ld_imm64 instructions that don't have user controlled constants and shouldn't be blinded.

Which versions are affected by CVE-2022-49552?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49552?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2022-49552 being exploited?

There is no known exploitation of CVE-2022-49552 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-68687, DEBIAN-CVE-2022-49552, GHSA-hg9m-frc8-4qpx, ROOT-OS-UBUNTU-2204-CVE-2022-49552, UBUNTU-CVE-2022-49552.

Is CVE-2022-49552 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free