dmiller
8c1eb1c50e
Fuzzer for validatepkt()
2026-08-18 16:06:56 +00:00
dmiller
27b7951833
Remove function in favor of well-tested one
2026-08-18 16:06:50 +00:00
dmiller
a5b8e61051
Fix signedness and strncpy truncation warnings
2026-07-30 21:29:05 +00:00
dmiller
eb79c42b05
Bind to source with -e, not only -S. Fixes #2122
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Waiting to run
2026-07-20 15:48:57 +00:00
dmiller
3fa8d201fa
Add checks for ip_hl < 5
2026-06-26 22:06:04 +00:00
dmiller
2b474bb49b
Fix bug in calculating data offset
2026-06-26 22:06:03 +00:00
dmiller
c86a45ef6e
Consolidate TCP option parsing
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Waiting to run
2026-06-24 14:47:12 +00:00
dmiller
738455f46c
Consolidate getNextHopMAC to libnetutil
2026-06-13 06:09:21 +00:00
dmiller
d8c9880cd5
Consolidate inet_ntop_ez-like code from throughout
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Has been cancelled
2026-06-11 23:28:26 +00:00
dmiller
c44b7b3f9b
move resolve_all to libnetutil. Let resolve use AI_IDN
2026-06-10 21:39:38 +00:00
dmiller
2a16e04500
Fix an issue with trusting packet ip_len field.
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Has been cancelled
2026-06-03 21:42:20 +00:00
dmiller
21557e7b2f
Ensure packet buffers are long enough for headers
2026-04-22 16:13:10 +00:00
dmiller
b2a7459609
Remove unused utility function
2026-04-22 16:13:09 +00:00
dmiller
dc3d01b783
Use aligned ICMPv6 header structs in traceND
2026-04-22 16:13:09 +00:00
dmiller
36f0b76bdb
More alignment fixes
2026-04-22 01:01:19 +00:00
dmiller
8ef3ed1471
Avoid undefined behavior from unaligned accesses
2026-04-20 15:21:55 +00:00
dmiller
367890df09
readip_pcap: link-layer header, not IP header, in linknfo
2026-03-23 15:29:44 +00:00
dmiller
5b78ef236e
Gracefully handle arp_open failure
2026-03-10 18:32:50 +00:00
dmiller
95d380b836
Bump copyright date to 2026 [skip ci]
2026-02-16 22:33:40 +00:00
dmiller
67a796844f
Consolidate raw socket acquisition.
2025-06-30 19:24:32 +00:00
dmiller
f4f5cba43d
Avoid copying link-layer header; point instead
2025-04-11 21:45:17 +00:00
dmiller
5f6bc69983
Account for VLAN header in pcap packets if needed.
2025-04-10 19:00:50 +00:00
dmiller
6db5c9cb85
Bump copyright date
2025-02-26 17:44:43 +00:00
dmiller
f999182d0f
Bump date and reapply header templates
2024-02-28 18:46:45 +00:00
dmiller
6f6b2de214
Apply new license templates, bump copyright date
2023-04-14 17:11:46 +00:00
dmiller
3c6c84b5f7
Avoid copying target/source addr data when a pointer will do
2022-10-31 20:50:19 +00:00
dmiller
e3ab97215d
Handle internationalized domain names (IDN)
2022-09-21 21:03:57 +00:00
dmiller
dd690b3e0b
Bump copyright date and update some links [ci skip]
2022-02-18 17:38:46 +00:00
fyodor
3aec3f3a07
Update to latest copyright templates. Main change is that Insecure.Com LLC is now Nmap Software LLC
2021-11-23 16:04:37 +00:00
dmiller
f22816da84
Use casts to fix build error C2664 with Windows SDK 8.1
2021-07-26 18:43:17 +00:00
dmiller
c9b7c2f590
Moar const
2021-04-26 17:58:01 +00:00
dmiller
1fd272f8dd
const all the things!
2021-04-23 20:37:41 +00:00
dmiller
67cccec38d
Use checked_fd_set in 2 more places: bounce scan and pcap_select
2021-01-07 18:31:09 +00:00
dmiller
3c5b7107d5
Avoid warnings about signedness in comparisons. See 2150
2020-10-15 17:45:48 +00:00
dmiller
ef8213a36c
Reintegrate Nmap 7.90 release branch
2020-10-05 23:00:30 +00:00
dmiller
3521f15180
Use signed value for tcp header offset and option lengths to detect underflow
2020-09-09 21:34:55 +00:00
dmiller
2520edd8fe
Be more strict with TCP options parsing, avoid reading off the end of TCP options. See #2107
2020-08-24 17:26:07 +00:00
dmiller
428c3e7700
Fix off-by-one issue in last change. Fixes #2107
2020-08-24 17:07:47 +00:00
dmiller
cfff367aa6
Handle case of corrupted TCP options with length 0. Fixes #2104
2020-08-18 20:36:12 +00:00
dmiller
5b6645e09d
Copy link header from beginning of frame, not beginning of IP header.
2020-04-06 21:39:58 +00:00
dmiller
d0dc55fc90
Inline broadcast_socket(), only used in one place.
...
Also remove the check for the special socket value 501, which is a
vestige of a workaround leftover from when raw sockets mostly worked on
Windows. That code was removed in r2812 back in 2005.
2020-01-14 05:38:29 +00:00
dmiller
7faec7f157
Inline getpcapinterfaces, used in only 1 location
2020-01-14 03:39:25 +00:00
dmiller
86f80305a1
Consolidate duplicate functions read_na_pcap and read_ns_reply_pcap.
2020-01-13 23:33:30 +00:00
dmiller
4ffeb09ad3
Use libnetutil's read_reply_pcap to deduplicate pcap reading logic.
2020-01-13 21:48:04 +00:00
dmiller
00cb4d22d9
Switch from pcap_next to pcap_next_ex to check for errors
...
This change supports #1394 . When the network goes down, Nmap ought to
stop instead of slowing to an infinite crawl.
2020-01-13 17:14:45 +00:00
dmiller
d639a53088
Bump copyright date in license headers
2019-05-28 21:36:04 +00:00
dmiller
c314e81cc6
Fix TCP option checking, which could be fooled by unknown kind into failing validation. See #1204
2018-05-01 03:39:49 +00:00
fyodor
ff62300249
Bump copyright dates to 2018 and slightly improve wording (doesn't change meaning) of Nmap license header text
2018-01-28 21:18:17 +00:00
dmiller
358d221aa3
Add debug info with getaddrinfo error
2017-10-04 18:27:30 +00:00
dmiller
9c7ea727a7
Update license terms for 2017
2017-06-07 12:32:38 +00:00