CVE-2026-45891 net: hns3: fix double free issue for tx spare buffer

High 7.8 Published Updated

A double-free vulnerability in the Linux kernel's hns3 network driver allows attackers to cause denial of service or potentially execute code via crafted network traffic.

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-2026-45891?

CVE-2026-45891 is a high-severity use after free vulnerability in Linux kernel, published on 27 May 2026. 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:

net: hns3: fix double free issue for tx spare buffer

In hns3_set_ringparam(), a temporary copy (tmp_rings) of the ring structure is created for rollback. However, the tx_spare pointer in the original ring handle is incorrectly left pointing to the old backup memory.

Later, if memory allocation fails in hns3_init_all_ring() during the setup, the error path attempts to free all newly allocated rings. Since tx_spare contains a stale (non-NULL) pointer from the backup, it is mistaken for a newly allocated buffer and is erroneously freed, leading to a double-free of the backup memory.

The root cause is that the tx_spare field was not cleared after its value was saved in tmp_rings, leaving a dangling pointer.

Fix this by setting tx_spare to NULL in the original ring structure when the creation of the new `tx_spare` fails. This ensures the error cleanup path only frees genuinely newly allocated buffers.

Weakness: CWE-415

Which versions are affected by CVE-2026-45891?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2026-45891?

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-2026-45891 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2026-45891, DEBIAN-CVE-2026-45891, GHSA-h6g2-742c-p38f, ROOT-OS-UBUNTU-2204-CVE-2026-45891, ROOT-OS-UBUNTU-2404-CVE-2026-45891, UBUNTU-CVE-2026-45891.

Is CVE-2026-45891 in your software?

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

Check your SBOMs for free