crypto: ixp4xx - fix buffer chain unwind on allocation failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0d44dc59b2b434b29aafeae581d06f81efac7c83 · < 25056329384010a8672552b134f609601dc4f80e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: ixp4xx - fix buffer chain unwind on allocation failure
chainup_buffers() builds a linked list of buffer descriptors for a scatterlist. If dma_pool_alloc() fails while constructing the list, the current code sets buf to NULL and later dereferences it unconditionally at the end of the function:
buf->next = NULL; buf->phys_next = 0;
This can lead to a null-pointer dereference on allocation failure.
If the failure happens after part of the descriptor chain has already been allocated and DMA-mapped, the partially constructed chain also needs to be released.
Fix this by terminating the partially constructed chain on allocation failure and letting the callers unwind it via their existing cleanup paths. Also fix ablk_perform() to preserve the hook pointers before checking for failure, so partially built chains can be freed correctly.
From the CVE record · Linux
The Linux kernel’s ixp4xx crypto code can dereference a null pointer if buffer-descriptor allocation fails while building a chain. The input does not specify how an attacker could trigger the failure or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the ixp4xx crypto code should check their versions; affected versions are not specified.