JLSEC-2026-2260: Passing too large an alignment to the memalign suite of functions (memalign, posix_memalign,...

Published Dec 2, 2026
·
Updated

Passing too large an alignment to the memalign suite of functions (memalign, posixmemalign, alignedalloc) in the GNU C Library version 2.30 to 2.42 may result in an integer overflow, which could consequently result in a heap corruption.

Note that the attacker must have control over both, the size as well as the alignment arguments of the memalign function to be able to exploit this. The size parameter must be close enough to PTRDIFFMAX so as to overflow sizet along with the large alignment argument. This limits the malicious inputs for the alignment for memalign to the range [1<<62+ 1, 1<<63] and exactly 1<<63 for posixmemalign and alignedalloc.

Typically the alignment argument passed to such functions is a known constrained quantity (e.g. page size, block size, struct sizes) and is not attacker controlled, because of which this may not be easily exploitable in practice. An application bug could potentially result in the input alignment being too large, e.g. due to a different buffer overflow or integer overflow in the application or its dependent libraries, but that is again an uncommon usage pattern given typical sources of alignments.

In GCCBootstrapjll, only the riscv64 glibc sysroot is affected.

Affected Software

1 affected component
julia/gccbootstrap_jll>=14.2.0

Event History

Dec 2, 2026
Advisory Published
via OSV·09:30 PM
Data Sourced
via OSV·09:30 PM
DescriptionSeverityAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What conditions are required for exploitation?

An attacker must control both the allocation size and alignment arguments passed to memalign, posix_memalign, or aligned_alloc. The size must be sufficiently close to PTRDIFF_MAX, and the alignment must be exceptionally large.

2

Which alignment values are relevant to the overflow condition?

For memalign, the malicious alignment range is [1<<62 + 1, 1<<63]. For posix_memalign and aligned_alloc, the relevant alignment is exactly 1<<63.

3

How can teams assess whether their application is realistically exposed?

Review calls to the affected allocation functions and trace the sources of both size and alignment values. Exposure is most plausible where both values can be influenced by untrusted input or by another application or dependency bug that produces an oversized alignment.

4

Is this likely to affect ordinary uses of aligned allocation?

Typically, no: alignment values are commonly fixed or constrained values such as page sizes, block sizes, or structure sizes. The required attacker-controlled, near-limit size and extremely large alignment make exploitation less likely in typical usage patterns.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203