GitHub Advisoryadvisory · crates.io

GHSA-2wq5-g96f-mv3v Ouch! allows a segmentation fault due to use of uninitialized memory

MEDIUM Published 2024-09-23 Modified 2024-09-23 Official page ↗
Ecosystem
crates.io
Packages
ouch
Severity
Moderate
CVSS vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Reviewed
2024-09-23

Affected packages

• crates.io ouch: < 0.3.1 → fixed in 0.3.1

Description

When trying to decompress a file using "ouch", we can reach the function "ouch::archive::zip::convert_zip_date_time". In the function, there is a unsafe function, "transmute". Once the "transmute" function is called to convert the type of "month" object, the address of the object is changed to the uninitialized memory region. After that, when other function tries to dereference "month", segmentation fault occurs.

References