Read the docs
TI-2023-30752 Aliases GHSA-wfg4-322g-9vqv

memoffset allows reading uninitialized memory

Priority LOW 38Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

memoffset allows attempt of reading data from address `0` with arbitrary type. This behavior is an undefined behavior because address `0` to `std::mem::size_of<T>` may not have valid bit-pattern with `T`. Old implementation dereferences uninitialized memory obtained from `std::mem::align_of`. Older implementation prior to it allows using uninitialized data obtained from `std::mem::uninitialized` with arbitrary type then compute offset by taking the address of field-projection. This may also result in an undefined behavior for "father" that includes (directly or transitively) type that [does not allow to be uninitialized](https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html). This flaw was corrected by using `std::ptr::addr_of` in <https://github.com/Gilnaa/memoffset/pull/50>.

Why it matters now

Fix Fixed memoffset (crates.io): 0.6.2

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—memoffset (crates.io)before 0.6.20.6.2Patch availableGHSA-wfg4-322g-9vqv
  • memoffset (crates.io) Vendor— Affected before 0.6.2 Fixed in 0.6.2 Patch available GHSA-wfg4-322g-9vqv

Remediation

  • Fix · GHSA-wfg4-322g-9vqv memoffset (crates.io) Fixed in 0.6.2 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-wfg4-322g-9vqv

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences