CVE-2026-41678: Rust Openssl Aes Unwrap Key Inverted Bounds Assertion

Inverted bounds assertion before AES_unwrap_key: the guard `OUT.len() + 8 <= IN.len()` is reversed. AES key unwrap (RFC 3394) writes `IN.len() - 8` bytes into `OUT`, so the correct invariant is `OUT.len() + 8 >= IN.len()` (equivalently `OUT.len() >= IN.len() - 8`). The reversed comparison admits undersized output buffers and causes an out-of-bounds write fro

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0Rust
greprules fetch cve-2026-41678-rust-openssl-aes-unwrap-key-inverted-bounds-assertion --engine opengrep

Description

Inverted bounds assertion before AES_unwrap_key: the guard `OUT.len() + 8 <= IN.len()` is reversed. AES key unwrap (RFC 3394) writes `IN.len() - 8` bytes into `OUT`, so the correct invariant is `OUT.len() + 8 >= IN.len()` (equivalently `OUT.len() >= IN.len() - 8`). The reversed comparison admits undersized output buffers and causes an out-of-bounds write fro