From 406da4cb702d021602a2088b8259bf68870691c6 Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Sun, 18 Oct 2026 23:45:36 +1300 Subject: [PATCH] nmap: patch CVE-2026-72712 Details: https://nvd.nist.gov/vuln/detail/cve-2026-72712 Signed-off-by: Ankur Tyagi --- .../nmap/files/CVE-2026-72712.patch | 46 +++++++++++++++++++ meta-oe/recipes-security/nmap/nmap_7.99.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta-oe/recipes-security/nmap/files/CVE-2026-72712.patch diff --git a/meta-oe/recipes-security/nmap/files/CVE-2026-72712.patch b/meta-oe/recipes-security/nmap/files/CVE-2026-72712.patch new file mode 100644 index 0000000000..f5e81aac0e --- /dev/null +++ b/meta-oe/recipes-security/nmap/files/CVE-2026-72712.patch @@ -0,0 +1,46 @@ +From 120d13b8aca52ec306e50eae9a74fb1bfe49540a Mon Sep 17 00:00:00 2001 +From: dmiller +Date: Thu, 11 Jun 2026 18:31:31 +0000 +Subject: [PATCH] Stop parsing on a zero-length packet option + +Fixes #3368. Closes #3373. + +(cherry picked from commit 7ef4ee030a0023fe22616387a000032e1a678b6a) + +CVE: CVE-2026-72712 +Upstream-Status: Backport [https://github.com/nmap/nmap/commit/7ef4ee030a0023fe22616387a000032e1a678b6a] + +Dropped changes to the CHANGELOG file. + +Signed-off-by: Ankur Tyagi +--- + nselib/packet.lua | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/nselib/packet.lua b/nselib/packet.lua +index ec6db40a2..e17972d88 100644 +--- a/nselib/packet.lua ++++ b/nselib/packet.lua +@@ -686,10 +686,7 @@ function Packet:parse_options(offset, length) + local opt_ptr = 0 + while opt_ptr < length do + local t, l, d +- options[op] = {} +- + t = self:u8(offset + opt_ptr) +- options[op].type = t + if t==0 or t==1 then + l = 1 + d = nil +@@ -699,6 +696,11 @@ function Packet:parse_options(offset, length) + d = self:raw(offset + opt_ptr + 2, l-2) + end + end ++ if l==0 then ++ break ++ end ++ options[op] = {} ++ options[op].type = t + options[op].len = l + options[op].data = d + opt_ptr = opt_ptr + l diff --git a/meta-oe/recipes-security/nmap/nmap_7.99.bb b/meta-oe/recipes-security/nmap/nmap_7.99.bb index 515623d63d..0cbef990cb 100644 --- a/meta-oe/recipes-security/nmap/nmap_7.99.bb +++ b/meta-oe/recipes-security/nmap/nmap_7.99.bb @@ -12,6 +12,7 @@ SRC_URI = "http://nmap.org/dist/${BP}.tar.bz2 \ file://0001-fix-racing-between-build-ncat-and-build-lua.patch \ file://0004-libdnet-fix-PF_PACKET-conftest-nested-function.patch \ file://CVE-2026-58058.patch \ + file://CVE-2026-72712.patch \ " SRC_URI[sha256sum] = "df512492ffd108e53a27a06f26d8635bbe89e0e569455dc8ffef058c035d51b2"