Affected versions of scratchpad used ptr::read to read elements while calling a user provided function f on them. Since the pointer read duplicates ownership, a panic inside the user provided f function could cause a double free when unwinding.
The flaw was fixed in commit 891561bea by removing the unsafe block and using a plain iterator.
{
"severity": "CRITICAL",
"github_reviewed": true,
"cwe_ids": [
"CWE-415"
],
"nvd_published_at": "2021-03-05T09:15:00Z",
"github_reviewed_at": "2022-06-17T00:23:59Z"
}