WS-2023-0196
Published:May 15, 2026
Updated:May 15, 2026
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" (https://github.com/Gilnaa/memoffset/pull/50).
Related Resources (6)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.8
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
9.1
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
HIGH