CVE-2024-27394 tcp: Fix Use-After-Free in tcp_ao_connect_init

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel TCP implementation 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-27394?

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

tcp: Fix Use-After-Free in tcp_ao_connect_init

Since call_rcu, which is called in the hlist_for_each_entry_rcu traversal of tcp_ao_connect_init, is not part of the RCU read critical section, it is possible that the RCU grace period will pass during the traversal and the key will be free.

To prevent this, it should be changed to hlist_for_each_entry_safe.

Weakness: CWE-416

Which versions are affected by CVE-2024-27394?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-27394?

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

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-27394 exists.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-27394, DEBIAN-CVE-2024-27394, GHSA-q3rg-6598-285v, UBUNTU-CVE-2024-27394.

Is CVE-2024-27394 in your software?

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

Check your SBOMs for free