[PATCH v4] memalign: reinstate alignment overflow check (CVE-2026-0861)

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Jan 15 21:11:46 GMT 2026


Hi Siddhesh,

> The change to cap valid sizes to PTRDIFF_MAX inadvertently dropped the
> overflow check for alignment in memalign functions, _mid_memalign and
> _int_memalign.  Reinstate the overflow check in _int_memalign, aligned
> with the PTRDIFF_MAX change since that is directly responsible for the
> CVE.  The missing _mid_memalign check is not relevant (and does not have
> a security impact) and may need a different approach to fully resolve,
> so it has been omitted.

This version looks good to me.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>

Cheers,
Wilco


More information about the Libc-alpha mailing list