Menu

Star on GitHub · 3.2k

CVE-2021-46959

7.8 · HIGH

In the Linux kernel, the following vulnerability has been resolved: spi: Fix use-after-free with devm_spi_alloc_* We can't rely on the contents of the devres list during spi_unregister_controller…

Published Feb 29, 2024CWE-416EPSS 0.24%

Overview

CVE-2021-46959 is a high-severity vulnerability. It was published on February 29, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical description

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

spi: Fix use-after-free with devm_spi_alloc_*

We can't rely on the contents of the devres list during

spi_unregister_controller(), as the list is already torn down at the

time we perform devres_find() for devm_spi_release_controller. This

causes devices registered with devm_spi_alloc_{master,slave}() to be

mistakenly identified as legacy, non-devm managed devices and have their

reference counters decremented below 0.

------------[ cut here ]------------

WARNING: CPU: 1 PID: 660 at lib/refcount.c:28 refcount_warn_saturate+0x108/0x174

[<b0396f04>] (refcount_warn_saturate) from [<b03c56a4>] (kobject_put+0x90/0x98)

[<b03c5614>] (kobject_put) from [<b0447b4c>] (put_device+0x20/0x24)

r4:b6700140

[<b0447b2c>] (put_device) from [<b07515e8>] (devm_spi_release_controller+0x3c/0x40)

[<b07515ac>] (devm_spi_release_controller) from [<b045343c>] (release_nodes+0x84/0xc4)

r5:b6700180 r4:b6700100

[<b04533b8>] (release_nodes) from

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2021-46959?

CVE-2021-46959 is a high-severity vulnerability. It was published on February 29, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

How severe is CVE-2021-46959?

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-46959?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-46959?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2021-46959 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related HIGH CVEs from 2021

View all