CVE-2024-44964 idpf: fix memory leaks and crashes while performing a soft reset

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel idpf driver allows attackers to cause crashes or potentially execute code during soft resets.

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

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

idpf: fix memory leaks and crashes while performing a soft reset

The second tagged commit introduced a UAF, as it removed restoring q_vector->vport pointers after reinitializating the structures. This is due to that all queue allocation functions are performed here with the new temporary vport structure and those functions rewrite the backpointers to the vport. Then, this new struct is freed and the pointers start leading to nowhere.

But generally speaking, the current logic is very fragile. It claims to be more reliable when the system is low on memory, but in fact, it consumes two times more memory as at the moment of running this function, there are two vports allocated with their queues and vectors. Moreover, it claims to prevent the driver from running into "bad state", but in fact, any error during the rebuild leaves the old vport in the partially allocated state. Finally, if the interface is down when the function is called, it always allocates a new queue set, but when the user decides to enable the interface later on, vport_open() allocates them once again, IOW there's a clear memory leak here.

Just don't allocate a new queue set when performing a reset, that solves crashes and memory leaks. Readd the old queue number and reopen the interface on rollback - that solves limbo states when the device is left disabled and/or without HW queues enabled.

Weakness: CWE-416, CWE-401

Which versions are affected by CVE-2024-44964?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-44964?

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

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-44964, DEBIAN-CVE-2024-44964, GHSA-2j9f-hmx4-cvgr, ROOT-OS-UBUNTU-2404-CVE-2024-44964, UBUNTU-CVE-2024-44964.

Is CVE-2024-44964 in your software?

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

Check your SBOMs for free