CVE & CISA-KEV Catalog

CVE-2021-47589

HIGH
7.8
CVSS v3
NVD

Description

In the Linux kernel, the following vulnerability has been resolved: igbvf: fix double free in `igbvf_probe` In `igbvf_probe`, if register_netdev() fails, the program will go to label err_hw_init, and then to label err_ioremap. In free_netdev() which is just below label err_ioremap, there is `list_for_each_entry_safe` and `netif_napi_del` which aims to delete all entries in `dev->napi_list`. The program has added an entry `adapter->rx_ring->napi` which is added by `netif_napi_add` in igbvf_alloc_queues(). However, adapter->rx_ring has been freed below label err_hw_init. So this a UAF. In terms of how to patch the problem, we can refer to igbvf_remove() and delete the entry before `adapter->rx_ring`. The KASAN logs are as follows: [ 35.126075] BUG: KASAN: use-after-free in free_netdev+0x1fd/0x450 [ 35.127170] Read of size 8 at addr ffff88810126d990 by task modprobe/366 [ 35.128360] [ 35.128643] CPU: 1 PID: 366 Comm: modprobe Not tainted 5.15.0-rc2+ #14 [ 35.129789] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 35.131749] Call Trace: [ 35.132199] dump_stack_lvl+0x59/0x7b [ 35.132865] print_address_description+0x7c/0x3b0 [ 35.133707] ? free_netdev+0x1fd/0x450 [ 35.134378] __kasan_report+0x160/0x1c0 [ 35.135063] ? free_netdev+0x1fd/0x450 [ 35.135738] kasan_report+0x4b/0x70 [ 35.136367] free_netdev+0x1fd/0x450 [ 35.137006] igbvf_probe+0x121d/0x1a10 [igbvf] [ 35.137808] ? igbvf_vlan_rx_add_vid+0x100/0x100 [igbvf] [ 35.138751] local_pci_probe+0x13c/0x1f0 [ 35.139461] pci_device_probe+0x37e/0x6c0 [ 35.165526] [ 35.165806] Allocated by task 366: [ 35.166414] ____kasan_kmalloc+0xc4/0xf0 [ 35.167117] foo_kmem_cache_alloc_trace+0x3c/0x50 [igbvf] [ 35.168078] igbvf_probe+0x9c5/0x1a10 [igbvf] [ 35.168866] local_pci_probe+0x13c/0x1f0 [ 35.169565] pci_device_probe+0x37e/0x6c0 [ 35.179713] [ 35.179993] Freed by task 366: [ 35.180539] kasan_set_track+0x4c/0x80 [ 35.181211] kasan_set_free_info+0x1f/0x40 [ 35.181942] ____kasan_slab_free+0x103/0x140 [ 35.182703] kfree+0xe3/0x250 [ 35.183239] igbvf_probe+0x1173/0x1a10 [igbvf] [ 35.184040] local_pci_probe+0x13c/0x1f0

How to fix

Remediation Available
linuxDebian
Fixed in:5.10.92-1CVE-2021-47589
Fixed in:5.15.15-1CVE-2021-47589
Fixed in:5.15.15-1CVE-2021-47589
Fixed in:5.15.15-1CVE-2021-47589
linuxUbuntu
Fixed in:4.4.0-273.307USN-7797-1
linux-awsUbuntu
Fixed in:4.4.0-1148.154USN-7797-2
Fixed in:4.4.0-1186.201USN-7797-3
linux-fipsUbuntu
Fixed in:4.4.0-1119.126USN-7865-1
linux-image-4.4.0-1119-fipsUbuntu
Fixed in:4.4.0-1119.126USN-7865-1
linux-image-4.4.0-1148-awsUbuntu
Fixed in:4.4.0-1148.154USN-7797-2
linux-image-4.4.0-1149-kvmUbuntu
Fixed in:4.4.0-1149.160USN-7797-1
linux-image-4.4.0-1186-awsUbuntu
Fixed in:4.4.0-1186.201USN-7797-3
linux-image-4.4.0-273-genericUbuntu
Fixed in:4.4.0-273.307~14.04.1USN-7797-2
Fixed in:4.4.0-273.307USN-7797-1
linux-image-4.4.0-273-lowlatencyUbuntu
Fixed in:4.4.0-273.307~14.04.1USN-7797-2
Fixed in:4.4.0-273.307USN-7797-1
linux-image-awsUbuntu
Fixed in:4.4.0.1148.145USN-7797-2
Fixed in:4.4.0.1186.190USN-7797-3
linux-image-fipsUbuntu
Fixed in:4.4.0.1119.120USN-7865-1
linux-image-genericUbuntu
Fixed in:4.4.0.273.279USN-7797-1
linux-image-generic-lts-xenialUbuntu
Fixed in:4.4.0.273.279USN-7797-1
linux-image-kvmUbuntu
Fixed in:4.4.0.1149.146USN-7797-1
linux-image-lowlatencyUbuntu
Fixed in:4.4.0.273.279USN-7797-1
linux-image-lowlatency-lts-xenialUbuntu
Fixed in:4.4.0.273.279USN-7797-1
linux-image-virtualUbuntu
Fixed in:4.4.0.273.279USN-7797-1
linux-image-virtual-lts-xenialUbuntu
Fixed in:4.4.0.273.279USN-7797-1
linux-kvmUbuntu
Fixed in:4.4.0-1149.160USN-7797-1
linux-lts-xenialUbuntu
Fixed in:4.4.0-273.307~14.04.1USN-7797-2

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.26%probability of exploitation in 30 days
17thpercentile

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

References

Related Vulnerabilities

Other CWE-415 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2023-25136Medium6.590%-Fix
CVE-2018-0101Critical10.087%-Fix
CVE-2003-0545Critical9.885%-Fix
CVE-2019-3829Medium5.359%-Fix
CVE-2026-33824Critical9.856%-Fix
CVE-2021-3407Medium5.550%-Fix
Embed a live status badge for CVE-2021-47589
CVE-2021-47589 severity badge

Markdown

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

HTML

<a href="https://tridentstack.com/cve/CVE-2021-47589"><img src="https://tridentstack.com/cve/badge/CVE-2021-47589.svg" alt="CVE-2021-47589"></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-11-21.