RUSTSEC-2021-0030

Source
https://rustsec.org/advisories/RUSTSEC-2021-0030
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0030.json
Aliases
Published
2021-02-18T12:00:00Z
Modified
2023-11-08T04:05:27.727053Z
Details

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.

References

Affected packages

crates.io / scratchpad

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
1.3.1

Ecosystem specific

{
    "affects": {
        "os": [],
        "functions": [
            "scratchpad::SliceMoveSource::move_elements"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
    "informational": null,
    "categories": [
        "memory-corruption"
    ]
}