VDB

CVE-2026-45891

CVE-2026-45891 PUBLISHED

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

Reported by linux · Published May 27, 2026

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
linux_kernellinux6.19.4, 6.18.14, 6.12.75, 6.6.128, 6.1.165, 5.15.202

Affected products

VendorProductVersions
LinuxLinux907676b130711fd1f627824559e92259db2061d1, 907676b130711fd1f627824559e92259db2061d1, 907676b130711fd1f627824559e92259db2061d1
LinuxLinux5.14, 0, 5.15.202
linuxlinux_kernel5.14, 5.14, 5.14
LinuxLinux907676b130711fd1f627824559e92259db2061d1, 907676b130711fd1f627824559e92259db2061d1, 907676b130711fd1f627824559e92259db2061d1

Timeline

  • May 27, 2026 CVE Published
  • May 28, 2026 EPSS Score (16 in total, the first dated here)
  • May 29, 2026 Security Advisory (131 in total, the first dated here)
  • Jun 4, 2026 Coalition ESS Score
  • Jun 25, 2026 CVE Updated
  • Aug 11, 2026 Distribution Patch (128 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-45891
vulnetix vdb fixes CVE-2026-45891

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-45891/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›