Junglewise Threat Intelligence

CVE-2026-45891: Linux Kernel HNS3 double free in tx spare buffer

CVE-2026-45891 · Severity: info · CVSS 0 · Published 2026-05-27

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability was identified in the Linux kernel's HNS3 network driver that could cause a system crash. When the driver attempts to reconfigure network settings and encounters a memory error, it may accidentally try to release the same piece of memory twice. This 'double-free' error typically leads to kernel instability or a denial-of-service condition, affecting the reliability of the network connection and the host system.

Technical details

A double-free vulnerability exists in the HNS3 Ethernet driver (hns3_enet.c) within the hns3_set_ringparam() function. When reconfiguring rings, the driver creates a temporary copy of the ring structure but fails to clear the tx_spare pointer in the original structure. If a subsequent memory allocation fails in hns3_init_all_ring(), the error handling path identifies the stale tx_spare pointer as a newly allocated buffer and attempts to free it, despite it still being part of the backup memory. This results in a double-free of the backup memory. The fix involves explicitly setting the tx_spare pointer to NULL in the original ring structure during the initialization failure path to ensure the cleanup routine only targets valid, newly allocated buffers.

Affected products

  • Linux Linux Kernel hns3 driver versions using tx bounce buffers

Timeline

  • 2026-02-05: patched: Initial patch submitted by Jian Shen
  • 2026-05-27: advisory: CVE-2026-45891 published by NVD

References