# GHSA-5J8W-R7G8-5472: Arrow2 allows double free in safe code

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2022-06-16
- Modified: 2023-11-08

## Also published as

- [RUSTSEC-2022-0012](https://cve.now/RUSTSEC-2022-0012.md) (RustSec)

## Affected versions

- arrow2 (crates.io): fixed in 0.7.1
- arrow2 (crates.io): from 0.8.0, fixed in 0.8.2
- arrow2 (crates.io): from 0.9.0, 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).

## References

- https://github.com/jorgecarleitao/arrow2/issues/880
- https://github.com/jorgecarleitao/arrow2
- https://rustsec.org/advisories/RUSTSEC-2022-0012.html

Page: https://cve.now/GHSA-5J8W-R7G8-5472

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
