CVE-2021-46974
Last modified
CVE-2021-46974 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. 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. EPSS estimates a 0.24% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | >= 4.14.113, < 4.14.233 |
| Linux | Linux Kernel | >= 4.19.19, < 4.19.190 |
| Linux | Linux Kernel | >= 5.0, < 5.4.117 |
| Linux | Linux Kernel | >= 5.5, < 5.10.35 |
| Linux | Linux Kernel | >= 5.11, < 5.11.19 |
| Linux | Linux Kernel | >= 5.12, < 5.12.2 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2021-46974?
How severe is CVE-2021-46974?
How do I fix CVE-2021-46974?
Are you affected by CVE-2021-46974?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
