CVE-2021-46974

bpf: Fix masking negation logic upon negative dst register

MEDIUM
5.5
CVSS Score
Published: February 27, 2024 at 06:47 PM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix masking negation logic upon negative dst register The negation logic for the case where the off_reg is sitting in the dst register is not correct given then we cannot just invert the add to a sub or vice versa. As a fix, perform the final bitwise and-op unconditionally into AX from the off_reg, then move the pointer from the src to dst and finally use AX as the source for the original pointer arithmetic operation such that the inversion yields a correct result. The single non-AX mov in between is possible given constant blinding is retaining it as it's not an immediate based operation.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 4.20.64.14.113 ≤ v < 4.14.2334.19.19 ≤ v < 4.19.1904.20.6 ≤ v < 4.215.0 ≤ v < 5.10.355.0 ≤ v < 5.11.195.0 ≤ v < 5.12.25.0 ≤ v < 5.135.0 ≤ v < 5.4.1175.11 ≤ v < 5.11.195.12 ≤ v < 5.12.25.5 ≤ v < 5.10.354.14.1134.19.194.20.65.078da99d449f64ca4d459cdbdcce513b64173cd979d63d50c0c0f7bc537bf821e056cc9fe5abd38ae03b6b1c880a03d4771257336dc3bca156dd51bf92a819b4cbef8c9527d9797110544b2055a4b96
Vendor states this is fixed in 0e2dfdc74a7f4036127356d42ea59388f153f42c (fixed)
Vendor states this is fixed in 2cfa537674cd1051a3b8111536d77d0558f33d5d (fixed)
Vendor states this is fixed in 4d542ddb88fb2f39bf7f14caa2902f3e8d06f6ba (fixed)
Vendor states this is fixed in 53e0db429b37a32b8fc706d0d90eb4583ad13848 (fixed)
Vendor states this is fixed in 6eba92a4d4be8feb4dc33976abac544fa99d6ecc (fixed)
Vendor states this is fixed in 7cf64d8679ca1cb20cf57d6a88bfee79a0922a66 (fixed)
Vendor states this is fixed in b9b34ddbe2076ade359cd5ce7537d5ed019e9807 (fixed)
Vendor states this is fixed in 4.14.233 (unaffected)
Vendor states this is fixed in 4.19.190 (unaffected)
Affected range stops below 4.21, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 5.0 (unaffected)
Vendor states this is fixed in 5.10.35 (unaffected)
Vendor states this is fixed in 5.11.19 (unaffected)
Vendor states this is fixed in 5.12.2 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.4.117 (unaffected)

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0e2dfdc74a7f4036127356d42ea59388f153f42c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2cfa537674cd1051a3b8111536d77d0558f33d5d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4d542ddb88fb2f39bf7f14caa2902f3e8d06f6ba
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/53e0db429b37a32b8fc706d0d90eb4583ad13848
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6eba92a4d4be8feb4dc33976abac544fa99d6ecc
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7cf64d8679ca1cb20cf57d6a88bfee79a0922a66
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b9b34ddbe2076ade359cd5ce7537d5ed019e9807

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card