RustSec logo

HistoryEditJSON (OSV)

RUSTSEC-2026-0115

Fragile bounds check when sampling from image

Reported
Issued
Package
imageproc (crates.io)
Type
INFO Unsound
Categories
Keywords
#out-of-bounds-read #memory-safety
  • https://github.com/image-rs/imageproc/pull/778
Patched
  • >=0.24.1, <0.25.0
  • >=0.25.1, <0.26.0
  • >=0.26.2
Unaffected
  • <0.24
Affected Functions
Version
imageproc::binary_descriptors::brief
  • >=0.24.0

Description

A read of pixels was coded as modifying coordinates to lie within the image bounds. It would calculate a coordinate by adding a constant to an input and taking the minimum of the resulting coordinate and 'dimension - 1'. This would not protect against malicious inputs that could overflow the addition. . Subsequently to the tricked bounds check the image could then be sampled at multiple, differently calculated coordinates exceeding the bounds.

Advisory available under CC0-1.0 license.