GHSA-2fjw-whxm-9v4q

Suggest an improvement
Source
https://github.com/advisories/GHSA-2fjw-whxm-9v4q
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/11/GHSA-2fjw-whxm-9v4q/GHSA-2fjw-whxm-9v4q.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2fjw-whxm-9v4q
Aliases
Published
2025-11-25T23:18:37Z
Modified
2025-11-26T06:28:56.934912Z
Severity
  • 9.3 (Critical) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:L/SA:N CVSS Calculator
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::withpagesize 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");

The fix has not been added to the Rust registry at the time of publish.

Database specific
{
    "nvd_published_at": null,
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-122"
    ],
    "severity": "CRITICAL",
    "github_reviewed_at": "2025-11-25T23:18:37Z"
}
References

Affected packages

crates.io / nftnl

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
0.8.0