Merge ~bryce/ubuntu/+source/nmap:sru-lp1908223-focal into ubuntu/+source/nmap:ubuntu/focal-devel

Proposed by Bryce Harrington
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: Bryce Harrington
Merged at revision: 8f66656ff67b64e6925d93e22a8498b8d80ba4f5
Proposed branch: ~bryce/ubuntu/+source/nmap:sru-lp1908223-focal
Merge into: ubuntu/+source/nmap:ubuntu/focal-devel
Diff against target: 83 lines (+49/-1)
4 files modified
debian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/avoid-assertion-failure-when-unsolicited-arp-response-received.patch (+38/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Athos Ribeiro (community) Approve
Canonical Server Reporter Pending
Canonical Server Core Reviewers Pending
Canonical Server Pending
Review via email: mp+437076@code.launchpad.net

Description of the change

SRUs a patch to fix an assertion crash that none of us seem to be able to reproduce but several community members have. The reporter indicates running it in a loop several hundred times might trigger it; I haven't attempted that but might be worth a try. In any case, we're going to rely on the community to perform the testing.

The patch itself is just a couple code lines, that only stops the clock when it's running. That seems straightforward and unlikely to lead to regression. Please doublecheck that my SRU text in the bug report makes sense.

To post a comment you must log in.
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Although I could not reproduce the issue, the patch is short and simple, and the SRU text makes sense (in special the test plan). The package builds fine. Unfortunately, there are no dep8 tests for the package.

LGTM. Thanks, Bryce!

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: bryce, athos-ribeiro
Uploaders: bryce, athos-ribeiro
MP auto-approved

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks,

Successfully signed dsc, buildinfo, changes files
Vcs-Git: https://git.launchpad.net/~bryce/ubuntu/+source/nmap
Vcs-Git-Commit: 8f66656ff67b64e6925d93e22a8498b8d80ba4f5
Vcs-Git-Ref: refs/heads/sru-lp1908223-focal
$ dput ubuntu ../nmap_7.80+dfsg1-2ubuntu0.1_source.changes
gpg: ../nmap_7.80+dfsg1-2ubuntu0.1_source.changes: Valid signature from E603B2578FB8F0FB
gpg: ../nmap_7.80+dfsg1-2ubuntu0.1.dsc: Valid signature from E603B2578FB8F0FB
Checking signature on .changes
Checking signature on .dsc
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading nmap_7.80+dfsg1-2ubuntu0.1.dsc: done.
  Uploading nmap_7.80+dfsg1-2ubuntu0.1.debian.tar.xz: done.
  Uploading nmap_7.80+dfsg1-2ubuntu0.1_source.buildinfo: done.
  Uploading nmap_7.80+dfsg1-2ubuntu0.1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index b5d8922..ad6aa42 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+nmap (7.80+dfsg1-2ubuntu0.1) focal; urgency=medium
7+
8+ * d/p/avoid-assertion-failure-when-unsolicited-arp-response-received.patch:
9+ Check if a timeout clock is running before attempting to stop it.
10+ (LP: #1908223)
11+
12+ -- Bryce Harrington <bryce@canonical.com> Mon, 30 Jan 2023 01:33:09 -0800
13+
14 nmap (7.80+dfsg1-2build1) focal; urgency=medium
15
16 * No-change rebuild for libgcc-s1 package name change.
17diff --git a/debian/control b/debian/control
18index c6abfcb..cb064cf 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -1,7 +1,8 @@
22 Source: nmap
23 Section: net
24 Priority: optional
25-Maintainer: Debian Security Tools <team+pkg-security@tracker.debian.org>
26+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
27+XSBC-Original-Maintainer: Debian Security Tools <team+pkg-security@tracker.debian.org>
28 Uploaders: Hilko Bengen <bengen@debian.org>,
29 Samuel Henrique <samueloph@debian.org>
30 Build-Depends: bison,
31diff --git a/debian/patches/avoid-assertion-failure-when-unsolicited-arp-response-received.patch b/debian/patches/avoid-assertion-failure-when-unsolicited-arp-response-received.patch
32new file mode 100644
33index 0000000..84de270
34--- /dev/null
35+++ b/debian/patches/avoid-assertion-failure-when-unsolicited-arp-response-received.patch
36@@ -0,0 +1,38 @@
37+From 33f421fd6e68fcb8ed50071661d9704717c81b2b Mon Sep 17 00:00:00 2001
38+From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
39+Date: Tue, 3 Dec 2019 17:04:13 +0000
40+Subject: [PATCH] Avoid assertion failure when unsolicited ARP response
41+ received
42+
43+We probably want a more explicit handling of the case where we get an
44+ARP response to a request that we did not send (system's own, or another
45+Nmap scan running at the same time). In any case, this ought to solve
46+the crashes reported as #1797 and #1764.
47+
48+Origin: upstream, https://github.com/nmap/nmap/commit/33f421fd6e68fcb8ed50071661d9704717c81b2b
49+Bug: https://github.com/nmap/nmap/issues/1797
50+Bug: https://github.com/nmap/nmap/issues/1764
51+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nmap/+bug/1908223
52+Last-Update: 2023-01-12
53+---
54+ scan_engine.cc | 7 ++++++-
55+ 1 file changed, 6 insertions(+), 1 deletion(-)
56+
57+diff --git a/scan_engine.cc b/scan_engine.cc
58+index bd73cc8ead..7a4766da26 100644
59+--- a/scan_engine.cc
60++++ b/scan_engine.cc
61+@@ -1275,7 +1275,12 @@ int UltraScanInfo::removeCompletedHosts() {
62+ }
63+ if (timedout)
64+ gstats->num_hosts_timedout++;
65+- hss->target->stopTimeOutClock(&now);
66++ /* We may have received an ARP response before we sent a probe, which
67++ * would mean the timeout clock is not running. Avoid an assertion
68++ * failure here by checking first. */
69++ if (hss->target->timeOutClockRunning()) {
70++ hss->target->stopTimeOutClock(&now);
71++ }
72+ }
73+ }
74+ return hostsRemoved;
75diff --git a/debian/patches/series b/debian/patches/series
76index abe4a88..d61c1e8 100644
77--- a/debian/patches/series
78+++ b/debian/patches/series
79@@ -2,3 +2,4 @@
80 0003-Link-against-lua-lpeg.patch
81 0005-ncat-manpage-self-reference.patch
82 0004-Python3-port-of-ndiff.patch
83+avoid-assertion-failure-when-unsolicited-arp-response-received.patch

Subscribers

People subscribed via source and target branches