CVE & CISA-KEV Catalog

CVE-2021-46959

HIGH
7.8
CVSS v3
NVD

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 [<b0454160>] (devres_release_all+0x5c/0x60) r8:b1638c54 r7:b117ad94 r6:b1638c10 r5:b117ad94 r4:b163dc10 [<b0454104>] (devres_release_all) from [<b044e41c>] (__device_release_driver+0x144/0x1ec) r5:b117ad94 r4:b163dc10 [<b044e2d8>] (__device_release_driver) from [<b044f70c>] (device_driver_detach+0x84/0xa0) r9:00000000 r8:00000000 r7:b117ad94 r6:b163dc54 r5:b1638c10 r4:b163dc10 [<b044f688>] (device_driver_detach) from [<b044d274>] (unbind_store+0xe4/0xf8) Instead, determine the devm allocation state as a flag on the controller which is guaranteed to be stable during cleanup.

How to fix

Remediation Available
linuxDebian
Fixed in:5.10.38-1CVE-2021-46959
Fixed in:5.10.38-1CVE-2021-46959
Fixed in:5.10.38-1CVE-2021-46959
Fixed in:5.10.38-1CVE-2021-46959
linuxUbuntu
Fixed in:4.4.0-268.302USN-7506-1
linux-awsUbuntu
Fixed in:4.4.0-1143.149USN-7506-2
Fixed in:4.4.0-1181.196USN-7506-1
linux-fipsUbuntu
Fixed in:4.4.0-1113.120USN-7506-3
linux-image-4.4.0-1113-fipsUbuntu
Fixed in:4.4.0-1113.120USN-7506-3
linux-image-4.4.0-1143-awsUbuntu
Fixed in:4.4.0-1143.149USN-7506-2
linux-image-4.4.0-1144-kvmUbuntu
Fixed in:4.4.0-1144.155USN-7506-1
linux-image-4.4.0-1181-awsUbuntu
Fixed in:4.4.0-1181.196USN-7506-1
linux-image-4.4.0-268-genericUbuntu
Fixed in:4.4.0-268.302~14.04.1USN-7506-4
Fixed in:4.4.0-268.302USN-7506-1
linux-image-4.4.0-268-lowlatencyUbuntu
Fixed in:4.4.0-268.302~14.04.1USN-7506-4
Fixed in:4.4.0-268.302USN-7506-1
linux-image-awsUbuntu
Fixed in:4.4.0.1143.140USN-7506-2
Fixed in:4.4.0.1181.185USN-7506-1
linux-image-fipsUbuntu
Fixed in:4.4.0.1113.114USN-7506-3
linux-image-genericUbuntu
Fixed in:4.4.0.268.274USN-7506-1
linux-image-generic-lts-xenialUbuntu
Fixed in:4.4.0.268.302~14.04.1USN-7506-4
Fixed in:4.4.0.268.274USN-7506-1
linux-image-kvmUbuntu
Fixed in:4.4.0.1144.141USN-7506-1
linux-image-lowlatencyUbuntu
Fixed in:4.4.0.268.274USN-7506-1
linux-image-lowlatency-lts-xenialUbuntu
Fixed in:4.4.0.268.302~14.04.1USN-7506-4
Fixed in:4.4.0.268.274USN-7506-1
linux-image-virtualUbuntu
Fixed in:4.4.0.268.274USN-7506-1
linux-image-virtual-lts-xenialUbuntu
Fixed in:4.4.0.268.302~14.04.1USN-7506-4
Fixed in:4.4.0.268.274USN-7506-1
linux-kvmUbuntu
Fixed in:4.4.0-1144.155USN-7506-1
linux-lts-xenialUbuntu
Fixed in:4.4.0-268.302~14.04.1USN-7506-4

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

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

Exploit Intelligence

0.24%probability of exploitation in 30 days
16thpercentile

Low risk: more likely to be exploited than 16% of all known CVEs.

References

Related Vulnerabilities

Other CWE-416 (Use After Free) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2019-0708Critical9.8100%KEV + Ransom-
CVE-2021-31166Critical9.8100%KEVFix
CVE-2015-5119Critical9.899%KEV-
CVE-2010-3962High8.197%KEV-
CVE-2015-0313Critical9.896%KEVFix
CVE-2017-9798High7.595%-Fix
Embed a live status badge for CVE-2021-46959
CVE-2021-46959 severity badge

Markdown

[![CVE-2021-46959](https://tridentstack.com/cve/badge/CVE-2021-46959.svg)](https://tridentstack.com/cve/CVE-2021-46959)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-46959"><img src="https://tridentstack.com/cve/badge/CVE-2021-46959.svg" alt="CVE-2021-46959"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-12-10.