CVE-2021-47005

PCI: endpoint: Fix NULL pointer dereference for ->get_features()

No CVSS score yet EPSS 0.24%

Published 28 Feb 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2021-47005

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47005 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

PCI: endpoint: Fix NULL pointer dereference for ->get_features()

get_features ops of pci_epc_ops may return NULL, causing NULL pointer dereference in pci_epf_test_alloc_space function. Let us add a check for pci_epc_feature pointer in pci_epf_test_bind before we access it to avoid any such NULL pointer dereference and return -ENOTSUPP in case pci_epc_feature is not found.

When the patch is not applied and EPC features is not implemented in the platform driver, we see the following dump due to kernel NULL pointer dereference.

Call trace: pci_epf_test_bind+0xf4/0x388 pci_epf_bind+0x3c/0x80 pci_epc_epf_link+0xa8/0xcc configfs_symlink+0x1a4/0x48c vfs_symlink+0x104/0x184 do_symlinkat+0x80/0xd4 __arm64_sys_symlinkat+0x1c/0x24 el0_svc_common.constprop.3+0xb8/0x170 el0_svc_handler+0x70/0x88 el0_svc+0x8/0x640 Code: d2800581 b9403ab9 f9404ebb 8b394f60 (f9400400) ---[ end trace a438e3c5a24f9df0 ]---

Exploitation

EPSS 0.24%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 15.5% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 28 Feb 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 2c04c5b8eef797dca99699cfb55ff42dd3c12c23, before bbed83d7060e07a5d309104d25a00f0a24441428
affected from 2c04c5b8eef797dca99699cfb55ff42dd3c12c23, before 679ebad058b8168f10e63876d63b0877fd2fe784
affected from 2c04c5b8eef797dca99699cfb55ff42dd3c12c23, before 0169d4f0bee44fdfef908c13ed21fcb326c38695
affected from 2c04c5b8eef797dca99699cfb55ff42dd3c12c23, before 6613bc2301ba291a1c5a90e1dc24cf3edf223c03
Other versions: unaffected
Linux
affected 5.1
unaffected before 5.1
unaffected from 5.10.38 up to and including 5.10.*
unaffected from 5.11.22 up to and including 5.11.*
unaffected from 5.12.5 up to and including 5.12.*
unaffected 5.13 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47005 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47005

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-47005
trivy image --scanners vuln IMAGE | grep CVE-2021-47005

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2021-47005 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.