A double-free vulnerability exists in the Linux kernel's hns3 network driver due to improper handling of the tx_spare pointer during ring parameter… (CVE-2026-45891)
A double-free vulnerability exists in the Linux kernel's hns3 network driver due to improper handling of the tx_spare pointer during ring parameter setup. This flaw can lead to freeing the same memory twice when an error occurs during ring initialization. The issue arises because the tx_spare pointer is not cleared after being saved, causing a stale pointer to be freed erroneously. This vulnerability has been fixed by ensuring tx_spare is set to NULL upon failure to allocate new buffers, preventing double-free errors.
AI Analysis
Technical Summary
The Linux kernel hns3 driver had a double-free vulnerability (CVE-2026-45891) in the hns3_set_ringparam() function. When setting ring parameters, a temporary copy of the ring structure is made for rollback purposes. However, the tx_spare pointer in the original ring structure was left pointing to old backup memory after the copy, and not cleared. If memory allocation fails later in hns3_init_all_ring(), the error cleanup path attempts to free all newly allocated buffers, including the stale tx_spare pointer, causing a double-free of the backup memory. The fix involves setting tx_spare to NULL in the original ring structure when allocation of a new tx_spare fails, ensuring only valid buffers are freed during cleanup.
Potential Impact
This vulnerability can cause a double-free condition in kernel memory, which may lead to system instability, crashes, or potential escalation of privileges due to memory corruption. The CVSS vector indicates local attack complexity and privileges required, with high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability has been fixed in the Linux kernel source by clearing the tx_spare pointer on allocation failure. Users should monitor official Linux kernel advisories and apply updates when available to remediate this issue.
A double-free vulnerability exists in the Linux kernel's hns3 network driver due to improper handling of the tx_spare pointer during ring parameter… (CVE-2026-45891)
Description
A double-free vulnerability exists in the Linux kernel's hns3 network driver due to improper handling of the tx_spare pointer during ring parameter setup. This flaw can lead to freeing the same memory twice when an error occurs during ring initialization. The issue arises because the tx_spare pointer is not cleared after being saved, causing a stale pointer to be freed erroneously. This vulnerability has been fixed by ensuring tx_spare is set to NULL upon failure to allocate new buffers, preventing double-free errors.
CVSS v3.1
Score 7.8high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel hns3 driver had a double-free vulnerability (CVE-2026-45891) in the hns3_set_ringparam() function. When setting ring parameters, a temporary copy of the ring structure is made for rollback purposes. However, the tx_spare pointer in the original ring structure was left pointing to old backup memory after the copy, and not cleared. If memory allocation fails later in hns3_init_all_ring(), the error cleanup path attempts to free all newly allocated buffers, including the stale tx_spare pointer, causing a double-free of the backup memory. The fix involves setting tx_spare to NULL in the original ring structure when allocation of a new tx_spare fails, ensuring only valid buffers are freed during cleanup.
Potential Impact
This vulnerability can cause a double-free condition in kernel memory, which may lead to system instability, crashes, or potential escalation of privileges due to memory corruption. The CVSS vector indicates local attack complexity and privileges required, with high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability has been fixed in the Linux kernel source by clearing the tx_spare pointer on allocation failure. Users should monitor official Linux kernel advisories and apply updates when available to remediate this issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-h6g2-742c-p38f
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-45891"]
- Ecosystems
- []
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a3ef7ee27e9c79719034ad9
Added to database: 06/26/2026, 22:06:38 UTC
Last enriched: 06/26/2026, 22:49:31 UTC
Last updated: 07/31/2026, 19:24:47 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.