GitHub Advisoryadvisory · crates.io

GHSA-5j8w-r7g8-5472 Arrow2 allows double free in `safe` code

HIGH Published 2022-06-16 Modified 2022-06-16 Official page ↗
Ecosystem
crates.io
Packages
arrow2
Severity
High
Weaknesses
CWE-415
Reviewed
2022-06-16

Affected packages

• crates.io arrow2: < 0.7.1 → fixed in 0.7.1 • crates.io arrow2: >= 0.8.0, < 0.8.2 → fixed in 0.8.2 • crates.io arrow2: >= 0.9.0, < 0.9.2 → fixed in 0.9.2

Description

The struct `Ffi_ArrowArray` implements `#derive(Clone)` that is inconsistent with its custom implementation of `Drop`, resulting in a double free when cloned. Cloning this struct in `safe` results in a segmentation fault, which is unsound. This derive was removed from this struct. All users are advised to either: • bump the patch version of this crate (for versions `v0.7,v0.8,v0.9`), or • migrate to a more recent version of the crate (when using `<0.7`). Doing so elimitates this vulnerability (code no longer compiles).

Related

Weakness · CWE (1)

References