29 Commits
Author SHA1 Message Date
Leon Anavi 628df95735 nmap: Upgrade 7.99 -> 7.991
Upgrade to release 7.991:

- Upgraded included OpenSSL t- version 3.0.21 on all platforms.
- Fixed a memory-consumption hang in Ncat's HTTP proxy code that
  affected both connect and listen modes, reported by kumama_nui.
- Patched our included libssh2 source with upstream fixes for
  CVE-2025-15661, CVE-2026-7598, CVE-2026-55199, CVE-2026-55200,
  CVE-2026-58050, and CVE-2026-58051. The version number has been
  annotated as 1.11.1_NMAP1
- [Zenmap][GH#3347] Fixed several issues leading t- crashes when
  parsing, editing, or saving command profiles containing '%'
  characters.
- [NSE][GH#2272] smb-enum-shares failed t- produce output for valid
  shares when an error was encountered on one share.
- [GH#3410] Fixed an issue where DNS resolution would incorrectly
  fail t- match the same name in a different case.
- [NSE][GH#1066] Added service names for SSL-protected services
  like amt-soap-https t- portrules for several scripts, ensuring
  they run on these as well as the standard unencrypted services.
- Audited and converted most instances of strcat, strcpy, and
  sprintf t- use bounded functions instead.
- [NSE][GH#2221] mysql-dump-hashes now uses the correct column name
  for MySQL 5.7+
- [NSE][GH#2238] http-referer-checker was incorrectly fetching
  off-host URLs. Now only URLs on the target are fetched.
- [GH#2122] When an interface is specified with -e, als- bind t-
  the IP address for that device s- that it works for non-Linux
  systems and non-root users.
- [Nsock][GH#1939] When nsock_iod_set_localaddr() is used,
  nsock_connect_*() will now treat errors in bind(2) as connection
  failure.
- [GH#2732] Fix a potential crash on 32-bit platforms in debug mode
  due to incorrect format specifier for 64-bit integer type.
  [Christopher Chavez]
- [GH#3201][GH#3367] Increase line length limit for
  nmap-service-probes and correctly handle lines that are to- long.
  [@liquidpele, Ashutosh Kumar Singh]
- [GH#3414] Avoid out-of-bounds read when parsing PTR domain names.
  [@toor11 (Juri)]
- [GH#2245] Ensure variables updated by signal handlers are
  volatile sig_atomic_t.
- [Ncat][GH#1410] Fix an assertion failure (count <= INT_MAX) in
  ncat -lk in some cases where stdin or a listening socket produces
  an error.
- [NSE][GH#1946] Fix a cryptic error in smb-enum-services, "Server
  returned less data than needed for header" when smb.start_smb()
  failed.
- Fixed an issue with parsing nmap-service-probes that could cause
  a corrupted file t- crash Nmap. Reported by Muhammed Hussein.
- [NSE][GH#2016] Removed hostmap-bfk.nse, since the service it used
  shut down.
- Fixed several issues reported by Himanshu Anand: infinite loop in
  TCP options parsing and out-of-bounds memory read in IPv4 OS
  detection; integer underflow in IPv6 extension header processing;
  and undefined behavior in DNS label parsing.
- [GH#2721] Added checks for returned pointers from OpenSSL
  allocation functions.
- [GH#1546] Fix an incorrect assertion "timeout / 1000 <= (long)
  o.scan_delay" in traceroute which failed for timeouts greater
  than 1 second when there was n- scan delay.
- [GH#3175] The --stats-every option can now be used in conjunction
  with --noninteractive. Previously, n- stats messages were printed
  if a TTY was not attached.
- [GH#3375] Nmap can now be built with OpenSSL 4.0
- [Nping][GH#1751] The --rate option will not accept a rate higher
  than 1000 packets per second, since Nsock timers have millisecond
  resolution. Use --delay 0 for unlimited rate.
- [Nping] Fixed several issues with Nping in IPv6 mode including:
  + [GH#1261] Incorrect BPF generated leading t- "expression
    rejects all packets"
  + [GH#3215] Incorrect constant used t- check for IP version in
    Ech- Server
- [NSE][GH#3368] Fixed an out-of-memory issue in packet.lua when
  parsing a zero-length TCP header option. [Maxim Suhanov]
- Fixed an issue where Nmap OS scan trusts a packet's ip_len t-
  size a CRC32 computation over TCP RST payload data, which may
  result in reading arbitrary heap data. Reported by Michael
  Bommarito.
- [Ncat][GH#3005] Correctly report listening port number. `ncat -l
  -p 0` will cause Ncat t- listen on an ephemeral port, but it was
  reporting itself as listening on port 0.
- [Ncat][GH#1672] Fixed an issue where Ncat in server mode would
  quit without printing the last received data on a connection,
  particularly affecting SCTP.
- [Ncat][GH#2827] Fixed an issue where Ncat in --send-only mode
  would ignore disconnects and crash when it tries t- send data t-
  a disconnected client.
- [Ncat][GH#3291] Fixed an issue where Ncat on Windows would quit
  after 2 minutes due t- an OS-enforced timeout on the half-open
  TCP socket used to emulate STDIN.
- [Nping][GH#564] Allow Nping t- fall back t- TCP Connect mode on
  Windows when Npcap is not installed.
- [Ncat] Fixed several issues reported by Muhammed Hussein
  involving crashes in Ncat's server-mode HTTP proxy, as well as
  one code-quality issue with its Telnet negotiation code.
- [Nsock][GH#2595] Fix an issue where Nsock's SOCKS4 proxy code
  would send additional null bytes on Windows and other platforms
  where the compiler does not understand __attribute__((packed)).
  [Daniel Miller]
- The --release-memory option is now a no-op. Nmap will always run
  finalization routines that release allocated memory before
  closing.
- Fixed an integer underflow in service_scan.cc that would cause
  little-endian integers extracted from the beginning of a service
  banner t- be interpreted as 0. Discovered with AFL++ by Malek
  Althubiany.
- [Nsock][GH#583] Use OpenSSL security levels and callbacks t-
  prevent errors connecting t- certain insecure targets when using
  NSOCK_SSL_MAX_SPEED. The default, as used in Ncat, now uses
  stricter-than-default security level.
- [GH#410] If a target times out due t- --host-timeout, d- not
  perform traceroute.
- [Nping][GH#380] Disallow combining Ethernet-related options like
  --dest-mac with --send-ip
- [NSE][GH#3250][GH#3206] Fix assertion failures in cases where
  connect or send returns immediately with a status other than
  ERROR, e.g. TIMEOUT or CANCELED. [Daniel Miller]
- [Ncat][GH#290] Enable ncat -l --ssl t- use DHE and ECDHE cipher
  suites for perfect forward secrecy.
- Fix a crash when writing long CPE strings t- output. Reported by
  Harshit Gupta. [Daniel Miller]
- [Ncat] Fix several cases where Ncat's SOCKS5 client could
  interpret uninitialized data as protocol data, triggered by a
  malicious SOCKS5 proxy server. N- code execution or application
  crash is possible. Reported by Govind Pratap Singh. [Daniel
  Miller]
- [Nping] Fix a out-of-bounds access in Nping Ech- client allowing
  a malicious Nping EchoServer t- zer- 32 bytes of memory outside
  the packet buffer. Reported by Harshit Gupta. [Daniel Miller]
- Fix a 1-byte overrun (read) while reading certain crafted DNS
  labels, reported by Peter Parker. [Daniel Miller]
- [NSE][GH#3317] Function url.build_path was mangling special
  characters in URL path segments. [nnposter]

Drop 0004-libdnet-fix-PF_PACKET-conftest-nested-function.patch
because the check for PF_PACKET that failed with clang has been
fixed with commit 33c39cd38 in the upstream of nmap.

Set OEQA_BUILDPATHS_SKIP to ignore upstream HOME path match and
avoid buildpaths QA error.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-10-15 22:22:00 -07:00
Khem Raj 8f3df8b447 recipes: Convert licenses to SPDX expressions
- Automatically convert all licenses to valid SPDX license expressions
  using convert-spdx-licenses.py

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-07-20 22:35:47 -07:00
Khem Raj 13bafd2753 nmap: upgrade 7.92 -> 7.99
License-Update: relicensed to NPSL (Nmap Public Source License)

fix bundled libdnet configure and static link

Add a patch fixing the libdnet PF_PACKET conftest, which used a
nested function definition clang rejects, making configure
wrongly conclude there is no Ethernet support.

Clear DISABLE_STATIC so the bundled libdnet libtool build also
produces libdnet.a (nmap links it statically), and serialize
the make since the top-level Makefile does not order the
link after the recursive libdnet build.

Also regenerate an existing patch to apply without fuzz.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-28 00:59:20 -07:00
Paolo Barbolini 44d6b2efa5 nmap: make python3 RDEPENDS conditional on ndiff
When ndiff was disabled by default in 51e070301e ("nmap: disable
ndiff"), the python3 RDEPENDS were left unconditional on the main
package. This causes python3-difflib, python3-asyncio and python3-xml
to be pulled into every image that includes nmap, even though ndiff is
not built and the core nmap binary (C++) does not need Python.

Gate the RDEPENDS behind the ndiff PACKAGECONFIG so that Python is only
required when ndiff is actually enabled.

Signed-off-by: Paolo Barbolini <paolo.barbolini@m4ss.net>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-03-30 19:46:40 -07:00
Yi Zhao 5db1cb3137 nmap: add recipe for 7.92
The nmap has changed its license to NPSL (Nmap Public Source License)
since 7.90[1][2]. See [3] for a discussion of this license.

According to [1] and [4], 7.92 is the last dual-licensed (GPL-2.0 and
NPSL)version:
"Note that some releases of Nmap may fall under a previous version of
this license, or a different license entirely. The exact terms for a
given version of Nmap can be found in the included LICENSE or COPYING
file. To ease the transition to the NPSL, the first three Nmap releases
made under that license (Nmap 7.90, 7.91, and 7.92) may also be used
under the previous Nmap license terms by anyone who prefers those. "

Add 7.92 recipe with GPLv2 license.

[1] https://nmap.org/npsl/
[2] https://lwn.net/Articles/842436/
[3] https://github.com/nmap/nmap/issues/2199
[4] https://nmap.org/changelog.html#7.92

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-05-05 10:16:54 -07:00
Gyorgy Sarvari 6c101fe29d nmap: set correct license
Nmap has switched from GPLv2 to  their own "Nmap Public Source
License" since a few release. Set it in the recipe accordingly.

The NPSL file in the license firectory has been downloaded
directly from https://svn.nmap.org/nmap/LICENSE

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-28 14:17:37 -07:00
Yi Zhao 12e69dd555 nmap: set UPSTREAM_CHECK_REGEX
Set UPSTREAM_CHECK_REGEX to check the correct latest stable verison.

Before the fix:
$ devtool latest-version nmap
INFO: Current version: 7.95
INFO: Latest version: 7.95-1

After the fix:
$ devtool latest-version nmap
INFO: Current version: 7.95
INFO: Latest version: 7.95

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-12 07:09:49 -07:00
Gyorgy Sarvari 3564ec12de nmap: add missing dependency
Building with ndiff PACKAGECONFIG failed with the following error:

|   File "/yocto/sandbox/build/tmp/work/cortexa53-poky-linux/nmap/7.95/nmap-7.95/ndiff/setup.py", line 11, in <module>
|     import setuptools.command.install
| ModuleNotFoundError: No module named 'setuptools'

Fix it by adding the missing dependency.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-02-15 19:30:23 -08:00
Hongxu Jia efc0b522c1 nmap: fix racing issue at do_compile
There are two build-lua rules, one in Makefile.in, another in
ncat/Makefile.in which is required by build-ncat

Build them may cause potential racing

$ bitbake lib32-nmap
$ grep -e "Compiling liblua" -e 'nmap-7.95/liblua' -e ": error" -n patch-to/temp/log.do_compile
Compiling liblua
make[1]: Entering directory 'path-to/build/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
Compiling liblua
make[2]: Entering directory 'path-to/build/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
make[2]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/recipe-sysroot-native/usr/bin/i686-wrsmllib32-linux/../../libexec/i686-wrsmllib32-linux/gcc/i686-wrsmllib32-linux/14.2.0/ld: ./../liblua/liblua.a: error adding symbols: no more archived files
collect2: error: ld returned 1 exit status
make[1]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'

Explicitly make build-ncat depends on build-lua to avoid racing,
after applying the patch
...
Compiling liblua
make[1]: Entering directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
make[1]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
Compiling liblua
make[2]: Entering directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
make[2]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-02-12 09:16:07 -08:00
Wang Mingyu 6a5b26d467 nmap: Fix off-by-one overflow in the IP protocol table.
Add patch to fix core dumped error when using "nmap -sO"

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-10-14 23:25:11 -07:00
Martin Jansa 0249db4dbb nmap: depend on libpcre2 not libpcre
* switched to libpcre2 in:
  https://github.com/nmap/nmap/commit/828ab48764b82d0226e860c73c5dac5b11f77385

* in builds hwere libpcre2 isn't pulled by some other dependency it was failing with:
| service_scan.h:74:10: fatal error: pcre2.h: No such file or directory                                                                                                                                                                       |    74 | #include <pcre2.h>                                                                                                                                                                                                                  |       |          ^~~~~~~~~|

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-09-10 09:34:15 -07:00
Khem Raj 68f542b606 nmap: Upgrade to 7.95
License-Update: Use full file for checksum ( COPYING -> LICENSE )

Use system libpcre
Drop py3 support patches, its default now

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-09-04 15:35:46 -07:00
Alexander Kanavin 51e070301e nmap: disable ndiff
In 7.80 this requires distutils (no longer provided in python 3.12).
This may be resolved in newer nmap versions, so if you care about it
please provide a version update: https://nmap.org/dist/

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-31 08:27:49 -08:00
Martin Jansa be8c765c7c *.patch: add Upstream-Status to all patches
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a

This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).

This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.

This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:

5 (26%) 	meta-xfce
6 (50%) 	meta-perl
15 (42%)        meta-webserver
21 (36%)        meta-gnome
25 (57%)        meta-filesystems
26 (43%)        meta-initramfs
45 (45%)        meta-python
47 (55%)        meta-multimedia
312 (63%)       meta-networking
756 (61%)       meta-oe

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-21 09:15:20 -07:00
Bartosz Golaszewski e20ebe6ce4 python3-nmap: add missing run-time dependencies
Add missing RDEPENDS for this package.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-06 23:07:59 -07:00
Khem Raj 14c7d8a0d7 recipes: Update LICENSE variable to use SPDX license identifiers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-04 17:41:45 -08:00
Martin Jansa c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
Changqing Li 8cf040ac76 nmap: change shebang to python3
upstream nmap is python2 compatiable now, but this recipe
supports python3.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-05-11 08:27:28 -07:00
Mingli Yu 51c6ea0bc0 nmap: make ndiff support python3
The ndiff is python2 compatible now, backport
a patch from debian to make ndiff port to python3.

Refer to https://sources.debian.org/data/main/n/nmap/7.80+dfsg1-2/debian/patches/0004-Python3-port-of-ndiff.patch

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-02-15 08:05:08 -08:00
Khem Raj bbf25b62da nmap: Use py3 in depends/rdepends
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-24 09:25:34 -08:00
Khem Raj 5057746583 meta-oe: Remove using python2
This change makes the parsing go though, we still might have build
issues, which will be reported in world builds seprately

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-22 09:56:34 -08:00
Peiran Hong b315c1a024 nmap: Update to 7.80
Updates nmap to v7.80, this solves the following CVEs:
	- CVE-2017-18594
	- CVE-2018-15173
and addressed numerous bugs as well.
The patch '0001-include-time.h-for-time-structure-definition.patch'
is modified to be applicable to the new version while serving for
the same purpose.
The license changed in the commit https://github.com/nmap/nmap/commit/d639a53
and is only a date bump without modification of any content in the
license.

Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-09-23 12:17:18 -07:00
Khem Raj 3b94c03c2b nmap: Fix build on RISC-V
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-03-07 09:33:45 -08:00
Scott Ellis fe157b9cb9 nmap: Include additional FILES path for certs
If both ncat and ssl are in PACKAGECONFIG then the installer adds
a cert bundle to

  /usr/share/ncat/ca-bundle.crt

Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-02-03 10:46:42 -08:00
Scott Ellis c5f0ba6648 nmap: Fix typo in pcre PACKAGECONFIG
Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-02-03 10:46:42 -08:00
Khem Raj f25ae4f0ab nmap: Fix build with clang8/musl/libc++
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-01-28 07:05:17 -08:00
Mingli Yu 6964fa543c nmap: install ndiff
Currently, the ndiff isn't built and installed
as ndiff is python2 compatible script and it
checks PYTHON_VERSION to determine whether
build and install ndiff in configure phase.

Update to inherit pythonnative to let the
PYTHON_VERSION to be 2 to let ndiff be built
and installed.

Apart from ndiff python script, there is another
script named ndiff.py used by ndiff, export
PYTHON_SITEPACKAGES_DIR to make ndiff.py installed
in the correct place.

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-22 11:32:58 -07:00
Armin Kuster 80b1450c01 nmap: update to 7.70
Update LIC_FILES_CHKSUM for yr change

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-12 07:19:43 -07:00
Armin Kuster aeaa543515 nmap: move recipe from meta-security to meta-oe
[V2]
Remove obsolete sed operations
Remove zenmap as python-pygtk was obsoleted in core

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-06-01 18:54:49 -07:00