CVE-2022-49552

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49552
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49552.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49552
Downstream
Related
Published
2025-02-26T02:14:01Z
Modified
2025-10-21T10:58:43.922805Z
Summary
bpf: Fix combination of jit blinding and pointers to bpf subprogs.
Details

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: errorcode(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] ? bpfloop+0x4d/0x70 [ 37.004932] ? bpfprog3899083f75e4c5de_F+0xe3/0x13b

The jit blinding logic didn't recognize that ldimm64 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 jitsubprogs() 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.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
69c087ba6225b574afb6e505b72cb75242a3d844
Fixed
a029b02b47dd5bb87a21550d9d9a80cb4dd3f714
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
69c087ba6225b574afb6e505b72cb75242a3d844
Fixed
d106a3e96fca30e44081eae9c27aab28fc132a46
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
69c087ba6225b574afb6e505b72cb75242a3d844
Fixed
4b6313cf99b0d51b49aeaea98ec76ca8161ecb80

Affected versions

v5.*

v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.17.1
v5.17.10
v5.17.11
v5.17.12
v5.17.2
v5.17.3
v5.17.4
v5.17.5
v5.17.6
v5.17.7
v5.17.8
v5.17.9
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.18.1

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.13.0
Fixed
5.17.13
Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
5.18.2