CVE-2024-47748 vhost_vdpa: assign irq bypass producer token correctly
A use-after-free vulnerability in the Linux kernel's vhost_vdpa driver allows attackers to potentially execute code or escalate privileges.
- 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-2024-47748?
CVE-2024-47748 is a high-severity use after free vulnerability in Linux kernel, published on 21 Oct 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:
vhost_vdpa: assign irq bypass producer token correctly
We used to call irq_bypass_unregister_producer() in vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the token pointer is still valid or not.
Actually, we use the eventfd_ctx as the token so the life cycle of the token should be bound to the VHOST_SET_VRING_CALL instead of vhost_vdpa_setup_vq_irq() which could be called by set_status().
Fixing this by setting up irq bypass producer's token when handling VHOST_SET_VRING_CALL and un-registering the producer before calling vhost_vring_ioctl() to prevent a possible use after free as eventfd could have been released in vhost_vring_ioctl(). And such registering and unregistering will only be done if DRIVER_OK is set.
Weakness: CWE-416
Which versions are affected by CVE-2024-47748?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-47748?
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-2024-47748 being exploited?
There is no known exploitation of CVE-2024-47748 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-50821, AZL-50892, BELL-CVE-2024-47748, DEBIAN-CVE-2024-47748, GHSA-7hw4-fm5w-rcv6, UBUNTU-CVE-2024-47748.