Advisory

GHSA-2fjw-whxm-9v4q

Also known as: RUSTSEC-2025-0126

Summary

libnftnl has Heap-based Buffer Overflow in nftnl::Batch::with_page_size (nftnl-rs)

Details

A heap-buffer-overflow vulnerability exists in the Rust wrapper for libnftnl, triggered via the nftnl::Batch::with_page_size constructor. When a small or malformed page size is provided, the underlying C code allocates an insufficient buffer, leading to out-of-bounds writes during batch initialization.

The flaw was fixed in commit 94a286f by adding an overflow check:

batch_page_size
    .checked_add(crate::nft_nlmsg_maxsize())
    .expect("batch_page_size is too large and would overflow");

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2025-11-25 23:18 UTC
Modified
2025-12-01 16:20 UTC

Affected packages and fixes

nftnl

crates.io · All systems

Affected

  • introduced 0, fixed 0.9.0 (semver)

Fixed versions

0.9.0

Fix

  • Fixed version 0.9.0
    cargo update -p nftnl --precise 0.9.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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences