CVE-2024-46741 misc: fastrpc: Fix double free of 'buf' in error path

High 7.8 Published Updated

A double free vulnerability in the Linux kernel's fastrpc driver allows attackers to potentially execute arbitrary 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-46741?

CVE-2024-46741 is a high-severity use after free vulnerability in Linux kernel, published on 18 Sep 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:

misc: fastrpc: Fix double free of 'buf' in error path

smatch warning: drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf'

In fastrpc_req_mmap() error path, the fastrpc buffer is freed in fastrpc_req_munmap_impl() if unmap is successful.

But in the end, there is an unconditional call to fastrpc_buf_free(). So the above case triggers the double free of fastrpc buf.

Weakness: CWE-415

Which versions are affected by CVE-2024-46741?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-46741?

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

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-46741, DEBIAN-CVE-2024-46741, GHSA-2mj9-cv5h-vqxp, UBUNTU-CVE-2024-46741.

Is CVE-2024-46741 in your software?

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

Check your SBOMs for free