bind: fix CVE-2019-6471 and CVE-2018-5743
v2 cover bind: fix CVE-2019-6471 and CVE-2018-5743
From: Kai Kang <[email protected]>
v2:
* add tag CVE in patch files
Kai Kang (1):
bind: fix CVE-2019-6471 and CVE-2018-5743
.../bind/0001-bind-fix-CVE-2019-6471.patch | 64 ++ ...01-fix-enforcement-of-tcp-clients-v1.patch | 60 ++ ...p-clients-could-still-be-exceeded-v2.patch | 670 +++++++++++++ ...rence-counter-for-pipeline-groups-v3.patch | 278 ++++++ ...accounting-and-client-mortality-chec.patch | 512 ++++++++++ ...a-and-pipeline-refs-allow-special-ca.patch | 911 ++++++++++++++++++ ...allowance-for-tcp-clients-interfaces.patch | 80 ++ ...perations-in-bin-named-client.c-with.patch | 140 +++ .../bind/bind_9.11.5-P4.bb | 8 + 9 files changed, 2723 insertions(+) create mode 100644 meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch create mode 100644 meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch create mode 100644 meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch create mode 100644 meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch create mode 100644 meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch create mode 100644 meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch create mode 100644 meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch create mode 100644 meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
Signature · 1 line
2.17.1
PATCH v2 1/1 bind: fix CVE-2019-6471 and CVE-2018-5743
From: Kai Kang <[email protected]>
Backport patches to fix CVE-2019-6471 and CVE-2018-5743 for bind. CVE-2019-6471 is fixed by 0001-bind-fix-CVE-2019-6471.patch and the other 6 patches are for CVE-2018-5743. And backport one more patch to fix compile error on arm caused by these 6 commits.
--- .../bind/0001-bind-fix-CVE-2019-6471.patch | 64 ++ ...01-fix-enforcement-of-tcp-clients-v1.patch | 60 ++ ...p-clients-could-still-be-exceeded-v2.patch | 670 +++++++++++++ ...rence-counter-for-pipeline-groups-v3.patch | 278 ++++++ ...accounting-and-client-mortality-chec.patch | 512 ++++++++++ ...a-and-pipeline-refs-allow-special-ca.patch | 911 ++++++++++++++++++ ...allowance-for-tcp-clients-interfaces.patch | 80 ++ ...perations-in-bin-named-client.c-with.patch | 140 +++ .../bind/bind_9.11.5-P4.bb | 8 + 9 files changed, 2723 insertions(+) create mode 100644 meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch create mode 100644 meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch create mode 100644 meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch create mode 100644 meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch create mode 100644 meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch create mode 100644 meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch create mode 100644 meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch create mode 100644 meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch new file +64 -0
@@ -0,0 +1,64 @@ +Backport patch to fix CVE-2019-6471. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2019-6471 + +CVE: CVE-2019-6471 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/3a9c7bb] + +Signed-off-by: Kai Kang <[email protected]> + +From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001 +From: Mark Andrews <[email protected]> +Date: Tue, 19 Mar 2019 14:14:21 +1100 +Subject: [PATCH] move item_out test inside lock in dns_dispatch_getnext() + +(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 408beda367..3278db4a07 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; +-- +2.20.1 +
meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch new file +60 -0
60 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch new file +670 -0
670 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch new file +278 -0
278 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch new file +512 -0
512 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch new file +911 -0
911 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch new file +80 -0
80 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch new file +140 -0
140 lines not on this page · raw message
meta/recipes-connectivity/bind/bind_9.11.5-P4.bb +8 -0
@@ -20,6 +20,14 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \ file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ file://0001-avoid-start-failure-with-bind-user.patch \ + file://0001-bind-fix-CVE-2019-6471.patch \ + file://0001-fix-enforcement-of-tcp-clients-v1.patch \ + file://0002-tcp-clients-could-still-be-exceeded-v2.patch \ + file://0003-use-reference-counter-for-pipeline-groups-v3.patch \ + file://0004-better-tcpquota-accounting-and-client-mortality-chec.patch \ + file://0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch \ + file://0006-restore-allowance-for-tcp-clients-interfaces.patch \ + file://0007-Replace-atomic-operations-in-bin-named-client.c-with.patch \ " SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960"
Signature · 1 line
2.17.1