CVE-2022-48861 vdpa: fix use-after-free on vp_vdpa_remove

Medium 5.5 Published Updated

A use-after-free vulnerability in the Linux kernel's vdpa driver allows attackers to potentially execute code or escalate privileges during device unbinding.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-48861?

CVE-2022-48861 is a medium-severity use after free vulnerability in Linux kernel, published on 16 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

vdpa: fix use-after-free on vp_vdpa_remove

When vp_vdpa driver is unbind, vp_vdpa is freed in vdpa_unregister_device and then vp_vdpa->mdev.pci_dev is dereferenced in vp_modern_remove, triggering use-after-free.

Call Trace of unbinding driver free vp_vdpa : do_syscall_64 vfs_write kernfs_fop_write_iter device_release_driver_internal pci_device_remove vp_vdpa_remove vdpa_unregister_device kobject_release device_release kfree

Call Trace of dereference vp_vdpa->mdev.pci_dev: vp_modern_remove pci_release_selected_regions pci_release_region pci_resource_len pci_resource_end (dev)->resource[(bar)].end

Weakness: CWE-416

Which versions are affected by CVE-2022-48861?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-48861?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2022-48861 being exploited?

There is no known exploitation of CVE-2022-48861 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-48861, GHSA-9c8v-c8p9-2pjh, UBUNTU-CVE-2022-48861.

Is CVE-2022-48861 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free