In the Linux kernel, the following vulnerability has been resolved: net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg ring When an… (CVE-2026-64047)
In the Linux kernel, the following vulnerability has been resolved: net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg ring When an sk_msg scatterlist ring wraps (sg.end < sg.start), tls_push_record() chains the tail portion of the ring to the head using sg_chain(). An extra entry in the sg array is reserved for this: struct sk_msg_sg { [...] /* The extra two elements: * 1) used for chaining the front and sections when the list becomes * partitioned (e.g. end < start). The crypto APIs require the * chaining; * 2) to chain tailer SG entries after the message. */ struct scatterlist data[MAX_MSG_FRAGS + 2]; The current code uses MAX_SKB_FRAGS + 1 as the ring size: sg_chain(&msg_pl->sg.data[msg_pl->sg.start], MAX_SKB_FRAGS - msg_pl->sg.start + 1, msg_pl->sg.data); This places the chain pointer at sg_chain(data[start], (MAX_SKB_FRAGS - msg_start + 1) .. = &data[start] + (MAX_SKB_FRAGS - msg_start + 1) - 1 = data[start + (MAX_SKB_FRAGS - start + 1) - 1] = data[MAX_SKB_FRAGS] instead of the true last entry. This is likely due to a "race" of the commit under Fixes landing close to commit 031097d9e079 ("bpf: sk_msg, zap ingress queue on psock down") Convert to ARRAY_SIZE and drop the data[start] / - start (as suggested by Sabrina).
AI Analysis
Technical Summary
The Linux kernel contained an off-by-one vulnerability in the TLS networking code related to the scatter-gather (sg) chain entry count when the sk_msg ring buffer wraps. Specifically, the code incorrectly used MAX_SKB_FRAGS + 1 as the ring size, which caused the chain pointer to reference an incorrect entry in the scatterlist array. This was due to a race condition with a recent commit and was fixed by converting to ARRAY_SIZE and adjusting the indexing logic to properly handle the wrapped ring scenario.
Potential Impact
The vulnerability could cause incorrect handling of TLS record scatter-gather lists in the kernel networking stack. The exact impact is not detailed, and no known exploits are reported. The issue could potentially lead to memory corruption or data integrity problems in TLS record processing within the kernel.
Mitigation Recommendations
A fix for this vulnerability has been implemented in the Linux kernel source code. Users and administrators should apply the official kernel updates that include this patch. Since this is a kernel-level fix, upgrading to a patched kernel version is the recommended remediation. Patch status is not explicitly confirmed here; check the Linux kernel vendor advisory or distribution security updates for the specific fixed versions.
In the Linux kernel, the following vulnerability has been resolved: net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg ring When an… (CVE-2026-64047)
Description
In the Linux kernel, the following vulnerability has been resolved: net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg ring When an sk_msg scatterlist ring wraps (sg.end < sg.start), tls_push_record() chains the tail portion of the ring to the head using sg_chain(). An extra entry in the sg array is reserved for this: struct sk_msg_sg { [...] /* The extra two elements: * 1) used for chaining the front and sections when the list becomes * partitioned (e.g. end < start). The crypto APIs require the * chaining; * 2) to chain tailer SG entries after the message. */ struct scatterlist data[MAX_MSG_FRAGS + 2]; The current code uses MAX_SKB_FRAGS + 1 as the ring size: sg_chain(&msg_pl->sg.data[msg_pl->sg.start], MAX_SKB_FRAGS - msg_pl->sg.start + 1, msg_pl->sg.data); This places the chain pointer at sg_chain(data[start], (MAX_SKB_FRAGS - msg_start + 1) .. = &data[start] + (MAX_SKB_FRAGS - msg_start + 1) - 1 = data[start + (MAX_SKB_FRAGS - start + 1) - 1] = data[MAX_SKB_FRAGS] instead of the true last entry. This is likely due to a "race" of the commit under Fixes landing close to commit 031097d9e079 ("bpf: sk_msg, zap ingress queue on psock down") Convert to ARRAY_SIZE and drop the data[start] / - start (as suggested by Sabrina).
CVSS v3.1
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel contained an off-by-one vulnerability in the TLS networking code related to the scatter-gather (sg) chain entry count when the sk_msg ring buffer wraps. Specifically, the code incorrectly used MAX_SKB_FRAGS + 1 as the ring size, which caused the chain pointer to reference an incorrect entry in the scatterlist array. This was due to a race condition with a recent commit and was fixed by converting to ARRAY_SIZE and adjusting the indexing logic to properly handle the wrapped ring scenario.
Potential Impact
The vulnerability could cause incorrect handling of TLS record scatter-gather lists in the kernel networking stack. The exact impact is not detailed, and no known exploits are reported. The issue could potentially lead to memory corruption or data integrity problems in TLS record processing within the kernel.
Mitigation Recommendations
A fix for this vulnerability has been implemented in the Linux kernel source code. Users and administrators should apply the official kernel updates that include this patch. Since this is a kernel-level fix, upgrading to a patched kernel version is the recommended remediation. Patch status is not explicitly confirmed here; check the Linux kernel vendor advisory or distribution security updates for the specific fixed versions.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-25cm-2563-466g
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-64047"]
- Ecosystems
- []
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a5d27a92a4a8d598912d20a
Added to database: 07/19/2026, 19:38:17 UTC
Last enriched: 07/19/2026, 19:57:13 UTC
Last updated: 07/20/2026, 19:41:22 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.