summaryrefslogtreecommitdiffstats
path: root/debian/patches/0015-move-item_out-test-inside-lock-in-dns_dispatch_getne.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 18:37:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 18:37:15 +0000
commit55ad72d44a94298a96b8f05488ca5ed97ef04736 (patch)
tree8aaa712c1d8b8d191b77a7eef4dc42c770e3b3d0 /debian/patches/0015-move-item_out-test-inside-lock-in-dns_dispatch_getne.patch
parentAdding upstream version 1:9.11.5.P4+dfsg. (diff)
downloadbind9-55ad72d44a94298a96b8f05488ca5ed97ef04736.tar.xz
bind9-55ad72d44a94298a96b8f05488ca5ed97ef04736.zip
Adding debian version 1:9.11.5.P4+dfsg-5.1+deb10u7.debian/1%9.11.5.P4+dfsg-5.1+deb10u7debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/0015-move-item_out-test-inside-lock-in-dns_dispatch_getne.patch')
-rw-r--r--debian/patches/0015-move-item_out-test-inside-lock-in-dns_dispatch_getne.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/debian/patches/0015-move-item_out-test-inside-lock-in-dns_dispatch_getne.patch b/debian/patches/0015-move-item_out-test-inside-lock-in-dns_dispatch_getne.patch
new file mode 100644
index 0000000..5b665a9
--- /dev/null
+++ b/debian/patches/0015-move-item_out-test-inside-lock-in-dns_dispatch_getne.patch
@@ -0,0 +1,54 @@
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 19 Mar 2019 14:14:21 +1100
+Subject: move item_out test inside lock in dns_dispatch_getnext()
+
+Origin: https://gitlab.isc.org/isc-projects/bind9/commit/3a9c7bb80d4a609b86427406d9dd783199920b5b
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2019-6471
+Bug-Debian: https://bugs.debian.org/930746
+
+(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712)
+---
+ lib/dns/dispatch.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c
+index d1e4c16..b5a8f74 100644
+--- a/lib/dns/dispatch.c
++++ b/lib/dns/dispatch.c
+@@ -134,7 +134,7 @@ struct dns_dispentry {
+ isc_task_t *task;
+ isc_taskaction_t action;
+ void *arg;
+- bool item_out;
++ bool item_out;
+ dispsocket_t *dispsocket;
+ ISC_LIST(dns_dispatchevent_t) items;
+ ISC_LINK(dns_dispentry_t) link;
+@@ -3422,13 +3422,14 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) {
+ disp = resp->disp;
+ REQUIRE(VALID_DISPATCH(disp));
+
+- REQUIRE(resp->item_out == true);
+- resp->item_out = false;
+-
+ ev = *sockevent;
+ *sockevent = NULL;
+
+ LOCK(&disp->lock);
++
++ REQUIRE(resp->item_out == true);
++ resp->item_out = false;
++
+ if (ev->buffer.base != NULL)
+ free_buffer(disp, ev->buffer.base, ev->buffer.length);
+ free_devent(disp, ev);
+@@ -3573,6 +3574,9 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp,
+ isc_task_send(disp->task[0], &disp->ctlevent);
+ }
+
++/*
++ * disp must be locked.
++ */
+ static void
+ do_cancel(dns_dispatch_t *disp) {
+ dns_dispatchevent_t *ev;