Advisory

GHSA-g23h-7vf9-xc25

Also known as: RUSTSEC-2022-0094

Summary

Mimalloc Can Allocate Memory with Bad Alignment

Details

This crate depended on a promise regarding alignments made by the author of the mimalloc allocator to avoid using aligned allocation functions where possible for performance reasons.
Since then, the mimalloc allocator's logic changed, making it break this promise.
This caused this crate to return memory with an incorrect alignment for some allocations, particularly those with large alignments.
The flaw was fixed by always using the aligned allocation functions.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-11-12 21:21 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

mimalloc

crates.io · All systems

Affected

  • introduced 0, fixed 0.1.39 (semver)

Fixed versions

0.1.39

Fix

  • Fixed version 0.1.39
    cargo update -p mimalloc --precise 0.1.39

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences