CVE-2025-39978 octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's octeontx2-pf 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-2025-39978?

CVE-2025-39978 is a high-severity use after free vulnerability in Linux, published on 15 Oct 2025. 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:

octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()

This code calls kfree_rcu(new_node, rcu) and then dereferences "new_node" and then dereferences it on the next line. Two lines later, we take a mutex so I don't think this is an RCU safe region. Re-order it to do the dereferences before queuing up the free.

Which versions are affected by CVE-2025-39978?

How do I fix CVE-2025-39978?

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-2025-39978 being exploited?

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

Sources

Also known as BELL-CVE-2025-39978, DEBIAN-CVE-2025-39978, GHSA-2829-fqm4-jgr9, ROOT-OS-DEBIAN-12-CVE-2025-39978, ROOT-OS-DEBIAN-13-CVE-2025-39978, ROOT-OS-UBUNTU-2204-CVE-2025-39978 and 2 more.

Is CVE-2025-39978 in your software?

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

Check your SBOMs for free