Merge ~paelzer/ubuntu/+source/bind9:bug-1797926-race-on-shutdown-bionic into ubuntu/+source/bind9:ubuntu/bionic-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 6f105789e5c4461652e4bc6b0e8ae0b59a0d7c56
Merge reported by: Christian Ehrhardt 
Merged at revision: 6f105789e5c4461652e4bc6b0e8ae0b59a0d7c56
Proposed branch: ~paelzer/ubuntu/+source/bind9:bug-1797926-race-on-shutdown-bionic
Merge into: ubuntu/+source/bind9:ubuntu/bionic-devel
Diff against target: 71 lines (+49/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/fix-shutdown-race.diff (+41/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+371043@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Continuation on https://code.launchpad.net/~paelzer/ubuntu/+source/bind9/+git/bind9/+merge/370942
which identified this extra fix for Xenial (other MP) and Bionic (this MP).

Part of the same PPA https://launchpad.net/~paelzer/+archive/ubuntu/bug-1833400-bind-crash

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Added the SRU template for 1797926

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Arr - forgot to set to "need's review".
Not it should be correctly visible ...

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The bug number in the 6f105789e5c4461652e4bc6b0e8ae0b59a0d7c56 commit message is wrong, but the contents of the commit are right.

+1

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Fixed the commit message to avoid later confusion - thanks.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

tagged and uploaded

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This migrated, closing forgotten MP

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 53a969f..868b5cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1bind9 (1:9.11.3+dfsg-1ubuntu1.9) bionic; urgency=medium
2
3 * d/p/fix-shutdown-race.diff: dig/host/nslookup could crash when interrupted
4 close to a query timeout (LP: #1797926)
5
6 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 07 Aug 2019 16:43:40 +0200
7
1bind9 (1:9.11.3+dfsg-1ubuntu1.8) bionic-security; urgency=medium8bind9 (1:9.11.3+dfsg-1ubuntu1.8) bionic-security; urgency=medium
29
3 * SECURITY UPDATE: DoS via malformed packets10 * SECURITY UPDATE: DoS via malformed packets
diff --git a/debian/patches/fix-shutdown-race.diff b/debian/patches/fix-shutdown-race.diff
4new file mode 10064411new file mode 100644
index 0000000..f10f51f
--- /dev/null
+++ b/debian/patches/fix-shutdown-race.diff
@@ -0,0 +1,41 @@
1From f2ca287330110993609fa0443d3bdb17629bd979 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <michal@isc.org>
3Date: Tue, 13 Nov 2018 13:50:47 +0100
4Subject: [PATCH 1/2] Fix a shutdown race in bin/dig/dighost.c
5
6If a tool using the routines defined in bin/dig/dighost.c is sent an
7interruption signal around the time a connection timeout is scheduled to
8fire, connect_timeout() may be executed after destroy_libs() detaches
9from the global task (setting 'global_task' to NULL), which results in a
10crash upon a UDP retry due to bringup_timer() attempting to create a
11timer with 'task' set to NULL. Fix by preventing connect_timeout() from
12attempting a retry when shutdown is in progress.
13
14(cherry picked from commit 462175659674a10c0d39c7c328f1a5324ce2e38b)
15
16Origin: https://gitlab.isc.org/isc-projects/bind9/merge_requests/1040/diffs
17Bug: https://gitlab.isc.org/isc-projects/bind9/issues/599
18Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/1797926
19Last-Update: 2018-12-06
20
21---
22 bin/dig/dighost.c | 5 +++++
23 1 file changed, 5 insertions(+)
24diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
25index 39abb9d0fd..17e0328228 100644
26--- a/bin/dig/dighost.c
27+++ b/bin/dig/dighost.c
28@@ -3240,6 +3240,11 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
29
30 INSIST(!free_now);
31
32+ if (cancel_now) {
33+ UNLOCK_LOOKUP;
34+ return;
35+ }
36+
37 if ((query != NULL) && (query->lookup->current_query != NULL) &&
38 ISC_LINK_LINKED(query->lookup->current_query, link) &&
39 (ISC_LIST_NEXT(query->lookup->current_query, link) != NULL)) {
40--
412.18.1
diff --git a/debian/patches/series b/debian/patches/series
index 3230d61..bbf12e7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -22,3 +22,4 @@ CVE-2019-6465.patch
22CVE-2018-5743.patch22CVE-2018-5743.patch
23CVE-2018-5743-atomic-fix.patch23CVE-2018-5743-atomic-fix.patch
24CVE-2019-6471.patch24CVE-2019-6471.patch
25fix-shutdown-race.diff

Subscribers

People subscribed via source and target branches