CVE-2024-49981 media: venus: fix use after free bug in venus_remove due to race condition

High 7.8 Published Updated

A race condition in the Linux kernel Venus media driver allows a use-after-free, potentially leading to code execution or system crash.

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-49981?

CVE-2024-49981 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:

media: venus: fix use after free bug in venus_remove due to race condition

in venus_probe, core->work is bound with venus_sys_error_handler, which is used to handle error. The code use core->sys_err_done to make sync work. The core->work is started in venus_event_notify.

If we call venus_remove, there might be an unfished work. The possible sequence is as follows:

CPU0 CPU1

|venus_sys_error_handler venus_remove | hfi_destroy | venus_hfi_destroy | kfree(hdev); | |hfi_reinit |venus_hfi_queues_reinit |//use hdev

Fix it by canceling the work in venus_remove.

Weakness: CWE-416, CWE-362

Which versions are affected by CVE-2024-49981?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-49981?

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-49981 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-51486, BELL-CVE-2024-49981, DEBIAN-CVE-2024-49981, GHSA-5frw-42jx-47v6, UBUNTU-CVE-2024-49981.

Is CVE-2024-49981 in your software?

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

Check your SBOMs for free