CVE-2022-50167

bpf: fix potential 32-bit overflow when accessing ARRAY map element

State
Published
Severity
7.8 High
Published
Jun 18, 2025
Updated
Oct 30, 2026
Reserved
Jun 18, 2025

Read the record on cve.org

Description

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

bpf: fix potential 32-bit overflow when accessing ARRAY map element

If BPF array map is bigger than 4GB, element pointer calculation can overflow because both index and elem_size are u32. Fix this everywhere by forcing 64-bit multiplication. Extract this formula into separate small helper and use it consistently in various places.

Speculative-preventing formula utilizing index_mask trick is left as is, but explicit u64 casts are added in both places.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • c85d69135a9175c50a823d04d62d932312d037b3 to before 2157ac13db8d5763835f1663bdabda6de744cba8Affected
  • c85d69135a9175c50a823d04d62d932312d037b3 to before f665c56e6836933335e5a4513fc9b0bf47cdf81fAffected
  • c85d69135a9175c50a823d04d62d932312d037b3 to before 063e092534d4c6785228e5b1eb6e9329f66ccbe4Affected
  • c85d69135a9175c50a823d04d62d932312d037b3 to before 3c7256b880b3a5aa1895fd169a34aa4224a11862Affected
  • c85d69135a9175c50a823d04d62d932312d037b3 to before 87ac0d600943994444e24382a87aa19acc4cd3d4Affected
LinuxLinux
  • 5.3Affected
  • before 5.3Not affected
  • 5.10.273 through 5.10.*Not affected
  • 5.15.224 through 5.15.*Not affected
  • 5.18.18 through 5.18.*Not affected
  • 5.19.2 through 5.19.*Not affected
  • 6.0 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.