All reports
Medium

Ouch! allows a segmentation fault due to use of uninitialized memory

Affected versions

Version ranges need review.

Rust / Cargoouch
Affected versions
< 0.3.1
Fixed version
0.3.1
Rust / Cargoouch
Affected versions
>=0.0.0-0 <0.3.2-0
Fixed version
0.3.2-0

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.

Links