net: tls: prevent chain-after-chain in plain text SG
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9aaaa56845a06aeabdd597cbe19492dc01f281ec · < af855f4c966afafef74faf8390c7b86568c0d46d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: tls: prevent chain-after-chain in plain text SG
Sashiko points out that if end = 0 (start != 0) the current code will create a chain link to content type right after the wrap link:
This would create a chain where the wrap link points directly to another chain link. The scatterlist API sg_next iterator does not recursively resolve consecutive chain links.
meaning this is illegal input to crypto.
The wrapping link is unnecessary if end = 0. end is the entry after the last one used so end = 0 means there's nothing pushed after the wrap:
end start i v v v [ ]...[ ][ d ][ d ][ d ][ d ][rsv for wrap]
Skip the wrapping in this case.
From the CVE record · Linux
The Linux kernel's network TLS code can create consecutive scatterlist chain links in a plain-text scatterlist when the end index is zero and the start index is nonzero. The scatterlist iterator does not resolve those links, resulting in invalid input to crypto. The input does not specify how an attacker could trigger this or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.