{"id":"GHSA-585q-cm62-757j","aliases":["GHSA-585q-cm62-757j","RUSTSEC-2025-0142"],"related":[],"kind":"vulnerability","state":"published","title":"mnl has segmentation fault and invalid memory read in `mnl::cb_run`","summary":"The function `mnl::cb_run` is marked as safe but exhibits unsound behavior when processing malformed Netlink message buffers.\n\nPassing a crafted byte slice to `mnl::cb_run` can trigger memory violations. The function does not sufficiently validate the input buffer structure before processing, leading to out-of-bounds reads.\n\nThis vulnerability allows an attacker to cause a Denial of Service (segmentation fault) or potentially read unmapped memory by providing a malformed Netlink message.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"The function `mnl::cb_run` is marked as safe but exhibits unsound behavior when processing malformed Netlink message buffers.\n\nPassing a crafted byte slice to `mnl::cb_run` can trigger memory violations. The function does not sufficiently validate the input buffer structure before processing, leading to out-of-bounds reads.\n\nThis vulnerability allows an attacker to cause a Denial of Service (segmentation fault) or potentially read unmapped memory by providing a malformed Netlink message.","format":"markdown","source":"ghsa"},{"lang":"en","text":"The function `mnl::cb_run` is marked as safe but exhibits unsound behavior when processing malformed Netlink message buffers.\n\nPassing a crafted byte slice to `mnl::cb_run` can trigger memory violations. The function does not sufficiently validate the input buffer structure before processing, leading to out-of-bounds reads.\n\nThis vulnerability allows an attacker to cause a Denial of Service (segmentation fault) or potentially read unmapped memory by providing a malformed Netlink message.\n\nThe underlying issue is a bug in `libmnl` where during validation `nlh->nlmsg_len` is cast to an `int` and becomes negative if `nlmsg_len` is greater than `INT_MAX`. This causes the validation to succeed even if the buffer is too small for the message. This has been fixed in `libmnl` but still affects version 1.0.5.\n\nThe issue in `mnl` was fixed in commit `cd51bdc` by checking the validity of netlink messages passed to `mnl::cb_run`.","format":"markdown","source":"rustsec"}],"published":"2025-10-18T12:00:00.000Z","modified":"2026-02-10T16:30:09.738Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","rating":"LOW"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","rating":"LOW"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.3.1"}],"ecosystem":"crates.io","package":"mnl","purl":"pkg:cargo/mnl","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.3.1"}],"ecosystem":"crates.io","package":"mnl","purl":"pkg:cargo/mnl","source":"rustsec"}],"references":[{"url":"https://github.com/mullvad/mnl-rs/issues/15","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/mullvad/mnl-rs/pull/21","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mullvad/mnl-rs/commit/61929d11c13b6cc4f864840a586fd48c6fd20ad9","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mullvad/mnl-rs","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0142.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/mnl","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-585q-cm62-757j","url":"https://github.com/advisories/GHSA-585q-cm62-757j","licence":"CC-BY-4.0","modified":"2026-02-10T16:30:09.738Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2025-0142","url":"https://rustsec.org/advisories/RUSTSEC-2025-0142.html","licence":"CC0-1.0","modified":"2026-02-10T13:31:44.174Z"}],"updatedAt":"2026-11-25T22:56:43.289Z"}