Advisory

RUSTSEC-2022-0012

Also known as: GHSA-5j8w-r7g8-5472

Summary

Arrow2 allows double free in safe code

Details

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).

Severity

Not rated by the source.

Dates

Published
2022-03-04 12:00 UTC
Modified
2023-11-08 04:15 UTC

Affected packages and fixes

arrow2

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.7.1, introduced 0.8.0, fixed 0.8.2, introduced 0.9.0, fixed 0.9.2, introduced 0.10.0, fixed 0.10.0 (semver)

Fixed versions

0.7.1, 0.8.2, 0.9.2, 0.10.0

Fix

  • Fixed version 0.7.1
    cargo update -p arrow2 --precise 0.7.1
  • Fixed version 0.8.2
    cargo update -p arrow2 --precise 0.8.2
  • Fixed version 0.9.2
    cargo update -p arrow2 --precise 0.9.2
  • Fixed version 0.10.0
    cargo update -p arrow2 --precise 0.10.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences