CVE-2026-97506: crypto: ixp4xx - fix buffer chain unwind on allocation failure
In the Linux kernel, the following vulnerability has been resolved:
crypto: ixp4xx - fix buffer chain unwind on allocation failure
chainupbuffers() builds a linked list of buffer descriptors for a scatterlist. If dmapoolalloc() 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->physnext = 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 ablkperform() to preserve the hook pointers before checking for failure, so partially built chains can be freed correctly.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the ixp4xx crypto buffer-chain construction, terminate a partially constructed chain when dma_pool_alloc() fails by setting buf->next = NULL and buf->phys_next = 0, so existing cleanup paths can unwind and release the allocated, DMA-mapped descriptors.
Event History
Frequently Asked Questions
Can a failure partway through descriptor construction leave DMA-mapped resources behind?
Yes. If allocation fails after descriptors have already been allocated and DMA-mapped, the partially built chain must be released; the fix ensures callers can unwind that partial chain through existing cleanup paths.
What failure condition is required for the null-pointer dereference?
dma_pool_alloc() must fail while chainup_buffers() is building the buffer-descriptor list. The prior logic then unconditionally dereferenced a NULL descriptor pointer when terminating the chain.