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
- https://git.kernel.org/stable/c/43015461662d41dcfb3bb95fadd8a2a42ad8eacf
- https://git.kernel.org/stable/c/6d2f142b1e4b203387a92519d9d2e34752a79dbb
- https://git.kernel.org/stable/c/6dc10494cfe27b6f1e9adb7e293293ae39c50b7c
- https://git.kernel.org/stable/c/c3659273860bed0c8e573b865e3769abc51225a8
- https://git.kernel.org/stable/c/d2c785733dfb853ea0b53984c75662a1af230a94
- https://git.kernel.org/stable/c/fb6a4c376d454b425555b1b0bda36e99f56ec307
- https://git.kernel.org/stable/c/fdbccddb7e7822016601829f95de4008e193f7bc