bpf: Fix masking negation logic upon negative dst register

Summary

CVECVE-2021-46974
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-02-27 19:04:07 UTC
Updated2026-08-04 10:16:39 UTC
DescriptionIn 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.

Risk And Classification

Primary CVSS: v3.1 5.5 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Problem Types: NVD-CWE-noinfo


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary5.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
3.1416baaa9-dc9f-4396-8d5f-8c081fb06d67Secondary7.1HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
3.1CNADECLARED7.1HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Linux Linux Kernel All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected ae03b6b1c880a03d4771257336dc3bca156dd51b 4d542ddb88fb2f39bf7f14caa2902f3e8d06f6ba git Not specified
CNA Linux Linux affected f92a819b4cbef8c9527d9797110544b2055a4b96 0e2dfdc74a7f4036127356d42ea59388f153f42c git Not specified
CNA Linux Linux affected 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 53e0db429b37a32b8fc706d0d90eb4583ad13848 git Not specified
CNA Linux Linux affected 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 2cfa537674cd1051a3b8111536d77d0558f33d5d git Not specified
CNA Linux Linux affected 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 6eba92a4d4be8feb4dc33976abac544fa99d6ecc git Not specified
CNA Linux Linux affected 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 7cf64d8679ca1cb20cf57d6a88bfee79a0922a66 git Not specified
CNA Linux Linux affected 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 b9b34ddbe2076ade359cd5ce7537d5ed019e9807 git Not specified
CNA Linux Linux affected 078da99d449f64ca04d459cdbdcce513b64173cd git Not specified
CNA Linux Linux affected 4.14.113 4.14.233 semver Not specified
CNA Linux Linux affected 4.19.19 4.19.190 semver Not specified
CNA Linux Linux affected 4.20.6 4.21 semver Not specified
CNA Linux Linux affected 5.0 Not specified
CNA Linux Linux unaffected 5.0 semver Not specified
CNA Linux Linux unaffected 4.14.233 4.14.* semver Not specified
CNA Linux Linux unaffected 4.19.190 4.19.* semver Not specified
CNA Linux Linux unaffected 5.4.117 5.4.* semver Not specified
CNA Linux Linux unaffected 5.10.35 5.10.* semver Not specified
CNA Linux Linux unaffected 5.11.19 5.11.* semver Not specified
CNA Linux Linux unaffected 5.12.2 5.12.* semver Not specified
CNA Linux Linux unaffected 5.13 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/7cf64d8679ca1cb20cf57d6a88bfee79a0922a66 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/0e2dfdc74a7f4036127356d42ea59388f153f42c af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/b9b34ddbe2076ade359cd5ce7537d5ed019e9807 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/4d542ddb88fb2f39bf7f14caa2902f3e8d06f6ba af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/2cfa537674cd1051a3b8111536d77d0558f33d5d af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/53e0db429b37a32b8fc706d0d90eb4583ad13848 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/6eba92a4d4be8feb4dc33976abac544fa99d6ecc af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 755966 SUSE Enterprise Linux Security Update for the linux kernel (SUSE-SU-2024:0857-1)
  • 755988 SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2024:0975-1)
  • 756004 SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2024:0926-1)
  • 756005 SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2024:0925-1)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report