Advisory

GHSA-7vm6-qwh5-9x44

Also known as: CVE-2024-51502

Summary

loona-hpack Panic Vulnerability

Details

Summary
loona-hpack suffers from the same vulnerability as the original hpack as documented in https://github.com/mlalic/hpack-rs/issues/11

Details
The original includes a very nice description of the problem, as well as an easy-enough fix for it.

PoC
The original example pretty much still applies:

use loona_hpack::Decoder;

pub fn main() {
    let input = &[0x3f];
    let mut decoder = Decoder::new();
    let _ = decoder.decode(input);
}

Impact
From the original:
All users who try to decode untrusted input using the Decoder are vulnerable to this exploit. A patched version of the crate is available on [crates.io](https://crates.io/crates/hpack-patched) under the name hpack-patched. See [Cargo's documentation on overriding dependencies](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html) for more information.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-11-04 23:22 UTC
Modified
2024-11-05 18:35 UTC

Affected packages and fixes

loona-hpack

crates.io · All systems

Affected

  • introduced 0, fixed 0.4.3 (semver)

Fixed versions

0.4.3

Fix

  • Fixed version 0.4.3
    cargo update -p loona-hpack --precise 0.4.3

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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences