CVE-2021-46974
Vulnerability from cvelistv5
Published
2024-02-27 18:47
Modified
2024-11-04 11:56
Severity ?
EPSS score ?
Summary
bpf: Fix masking negation logic upon negative dst register
References
{ "containers": { "adp": [ { "metrics": [ { "other": { "content": { "id": "CVE-2021-46974", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-03-05T16:32:03.243683Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-06-04T17:13:10.865Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" }, { "providerMetadata": { "dateUpdated": "2024-08-04T05:17:43.104Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/4d542ddb88fb2f39bf7f14caa2902f3e8d06f6ba" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/0e2dfdc74a7f4036127356d42ea59388f153f42c" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/53e0db429b37a32b8fc706d0d90eb4583ad13848" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/2cfa537674cd1051a3b8111536d77d0558f33d5d" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/6eba92a4d4be8feb4dc33976abac544fa99d6ecc" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/7cf64d8679ca1cb20cf57d6a88bfee79a0922a66" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/b9b34ddbe2076ade359cd5ce7537d5ed019e9807" } ], "title": "CVE Program Container" } ], "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "kernel/bpf/verifier.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "4d542ddb88fb", "status": "affected", "version": "ae03b6b1c880", "versionType": "git" }, { "lessThan": "0e2dfdc74a7f", "status": "affected", "version": "f92a819b4cbe", "versionType": "git" }, { "lessThan": "53e0db429b37", "status": "affected", "version": "979d63d50c0c", "versionType": "git" }, { "lessThan": "2cfa537674cd", "status": "affected", "version": "979d63d50c0c", "versionType": "git" }, { "lessThan": "6eba92a4d4be", "status": "affected", "version": "979d63d50c0c", "versionType": "git" }, { "lessThan": "7cf64d8679ca", "status": "affected", "version": "979d63d50c0c", "versionType": "git" }, { "lessThan": "b9b34ddbe207", "status": "affected", "version": "979d63d50c0c", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "kernel/bpf/verifier.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.0" }, { "lessThan": "5.0", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "4.14.*", "status": "unaffected", "version": "4.14.233", "versionType": "semver" }, { "lessThanOrEqual": "4.19.*", "status": "unaffected", "version": "4.19.190", "versionType": "semver" }, { "lessThanOrEqual": "5.4.*", "status": "unaffected", "version": "5.4.117", "versionType": "semver" }, { "lessThanOrEqual": "5.10.*", "status": "unaffected", "version": "5.10.35", "versionType": "semver" }, { "lessThanOrEqual": "5.11.*", "status": "unaffected", "version": "5.11.19", "versionType": "semver" }, { "lessThanOrEqual": "5.12.*", "status": "unaffected", "version": "5.12.2", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "5.13", "versionType": "original_commit_for_fix" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix masking negation logic upon negative dst register\n\nThe negation logic for the case where the off_reg is sitting in the\ndst register is not correct given then we cannot just invert the add\nto a sub or vice versa. As a fix, perform the final bitwise and-op\nunconditionally into AX from the off_reg, then move the pointer from\nthe src to dst and finally use AX as the source for the original\npointer arithmetic operation such that the inversion yields a correct\nresult. The single non-AX mov in between is possible given constant\nblinding is retaining it as it\u0027s not an immediate based operation." } ], "providerMetadata": { "dateUpdated": "2024-11-04T11:56:57.967Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/4d542ddb88fb2f39bf7f14caa2902f3e8d06f6ba" }, { "url": "https://git.kernel.org/stable/c/0e2dfdc74a7f4036127356d42ea59388f153f42c" }, { "url": "https://git.kernel.org/stable/c/53e0db429b37a32b8fc706d0d90eb4583ad13848" }, { "url": "https://git.kernel.org/stable/c/2cfa537674cd1051a3b8111536d77d0558f33d5d" }, { "url": "https://git.kernel.org/stable/c/6eba92a4d4be8feb4dc33976abac544fa99d6ecc" }, { "url": "https://git.kernel.org/stable/c/7cf64d8679ca1cb20cf57d6a88bfee79a0922a66" }, { "url": "https://git.kernel.org/stable/c/b9b34ddbe2076ade359cd5ce7537d5ed019e9807" } ], "title": "bpf: Fix masking negation logic upon negative dst register", "x_generator": { "engine": "bippy-9e1c9544281a" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2021-46974", "datePublished": "2024-02-27T18:47:08.487Z", "dateReserved": "2024-02-27T18:42:55.944Z", "dateUpdated": "2024-11-04T11:56:57.967Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2021-46974\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-02-27T19:04:07.500\",\"lastModified\":\"2024-02-28T14:06:45.783\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbpf: Fix masking negation logic upon negative dst register\\n\\nThe negation logic for the case where the off_reg is sitting in the\\ndst register is not correct given then we cannot just invert the add\\nto a sub or vice versa. As a fix, perform the final bitwise and-op\\nunconditionally into AX from the off_reg, then move the pointer from\\nthe src to dst and finally use AX as the source for the original\\npointer arithmetic operation such that the inversion yields a correct\\nresult. The single non-AX mov in between is possible given constant\\nblinding is retaining it as it\u0027s not an immediate based operation.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf: corrige la l\u00f3gica de negaci\u00f3n de enmascaramiento en el registro dst negativo. La l\u00f3gica de negaci\u00f3n para el caso en el que off_reg se encuentra en el registro dst no es correcta, dado que entonces no podemos simplemente invertir la adici\u00f3n a un sub o viceversa. Como soluci\u00f3n, realice la operaci\u00f3n final bit a bit incondicionalmente en AX desde off_reg, luego mueva el puntero de src a dst y finalmente use AX como fuente para la operaci\u00f3n aritm\u00e9tica del puntero original de modo que la inversi\u00f3n produzca un resultado correcto. El \u00fanico movimiento que no sea AX en el medio es posible dado que el cegamiento constante lo retiene, ya que no es una operaci\u00f3n inmediata.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0e2dfdc74a7f4036127356d42ea59388f153f42c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2cfa537674cd1051a3b8111536d77d0558f33d5d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/4d542ddb88fb2f39bf7f14caa2902f3e8d06f6ba\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/53e0db429b37a32b8fc706d0d90eb4583ad13848\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6eba92a4d4be8feb4dc33976abac544fa99d6ecc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7cf64d8679ca1cb20cf57d6a88bfee79a0922a66\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b9b34ddbe2076ade359cd5ce7537d5ed019e9807\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading...
Loading...
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.