crypto: af-alg - fix NULL pointer dereference in scatterwalk
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8ff590903d5fc7f5a0a988c38267a3d08e6393a2 · < 00cbdec17c15d024a1c5002c7365df7624a18a75| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: af-alg - fix NULL pointer dereference in scatterwalk
The AF_ALG interface fails to unmark the end of a Scatter/Gather List (SGL) when chaining a new af_alg_tsgl structure. If a sendmsg() fills an SGL exactly to MAX_SGL_ENTS, the last entry is marked as the end. A subsequent sendmsg() allocates a new SGL and chains it, but fails to clear the end marker on the previous SGL's last data entry.
This causes the crypto scatterwalk to hit a premature end, returning NULL on sg_next() and leading to a kernel panic during dereference.
Fix this by explicitly unmarking the end of the previous SGL when performing sg_chain() in af_alg_alloc_tsgl().
From the CVE record · Linux
The Linux kernel’s AF_ALG interface can leave an incorrect end marker when chaining scatter/gather lists. A local caller that fills a list exactly to MAX_SGL_ENTS and then makes another sendmsg() call can trigger a NULL pointer dereference and kernel panic. The input does not specify authentication requirements beyond the ability to make these calls.
Administrators running the Linux kernel should check whether their kernel includes the AF_ALG fix; affected versions are not specified.