PT-2021-16837
CVE-2021-25906
·
Published
2021-01-10
·
Updated
2021-08-25
Description by
CVSS 3.1
7.5
HighMetricsAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions
basic dsp matrix crate versions prior to 0.9.2
Description
An issue was discovered in the basic dsp matrix crate where a double drop can be performed when a TransformContent panic occurs. This happens because affected versions of the crate did not guard against double drop while temporarily duplicating objects' ownership using
ptr::read(). Upon panic in a user-provided function conversion(), objects that are copied by ptr::read() are dropped twice, leading to memory corruption.Recommendations
For basic dsp matrix crate versions prior to 0.9.2, update to version 0.9.2 or later, which uses
ManuallyDrop<T> to enclose objects that are to be temporarily duplicated, correcting the flaw. Found an issue in the description? Have something to add? Feel free to write us 👾