From b42e9c38a30e910798c75b057d08048148bcffa3 Mon Sep 17 00:00:00 2001 From: chengyechun Date: Wed, 21 Jun 2023 15:05:36 +0800 Subject: [PATCH] sync patch from upstream --- ...when-ntpd-deletes-the-last-interface.patch | 37 +++++++++++++++++++ ntp.spec | 9 ++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 backport-add-NULL-pointer-check-when-ntpd-deletes-the-last-interface.patch diff --git a/backport-add-NULL-pointer-check-when-ntpd-deletes-the-last-interface.patch b/backport-add-NULL-pointer-check-when-ntpd-deletes-the-last-interface.patch new file mode 100644 index 0000000..9ec1ebf --- /dev/null +++ b/backport-add-NULL-pointer-check-when-ntpd-deletes-the-last-interface.patch @@ -0,0 +1,37 @@ +From 6f92672308e9ff2ff72f1d929b6887ab24787e42 Mon Sep 17 00:00:00 2001 +From: Harlen Stenn +Date: Tue, 20 Jun 2023 18:41:55 +0000 +Subject: [PATCH] add NULL pointer check when ntpd deletes the last interface + +Conflict:NA +Reference:https://bugs.ntp.org/attachment.cgi?id=1854&action=diff + +--- + include/ntp_lists.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/ntp_lists.h b/include/ntp_lists.h +index d741974..37befc0 100644 +--- a/include/ntp_lists.h ++++ b/include/ntp_lists.h +@@ -181,7 +181,7 @@ do { \ + + #define UNLINK_EXPR_SLIST(punlinked, listhead, expr, nextlink, \ + entrytype) \ +-do { \ ++if (NULL != (listhead)) { \ + entrytype **ppentry; \ + \ + ppentry = &(listhead); \ +@@ -202,6 +202,8 @@ do { \ + } else { \ + (punlinked) = NULL; \ + } \ ++} else do { \ ++ (punlinked) = NULL; \ + } while (FALSE) + + #define UNLINK_SLIST(punlinked, listhead, ptounlink, nextlink, \ +-- +2.27.0 + diff --git a/ntp.spec b/ntp.spec index 2306fc1..2fa61f8 100644 --- a/ntp.spec +++ b/ntp.spec @@ -2,7 +2,7 @@ Name: ntp Version: 4.2.8p15 -Release: 9 +Release: 10 Summary: A protocol designed to synchronize the clocks of computers over a network License: MIT and BSD and BSD with advertising URL: https://www.ntp.org/ @@ -27,6 +27,7 @@ Patch4: fix-multiple-defination-with-gcc-10.patch Patch5: Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch Patch6: backport-CVE-2023-26551-CVE-2023-26552-CVE-2023-26553-CVE-2023-26554.patch Patch7: backport-CVE-2023-26555-fix-out-write-bounds-in-praecis_parse.patch +Patch8: backport-add-NULL-pointer-check-when-ntpd-deletes-the-last-interface.patch BuildRequires: libcap-devel openssl-devel libedit-devel libevent-devel pps-tools-devel BuildRequires: autogen autogen-libopts-devel systemd gcc perl-generators perl-HTML-Parser @@ -210,6 +211,12 @@ make check %{_mandir}/man8/*.8* %changelog +* Wed Jun 21 2023 chengyechun - 4.2.8p15-10 +- Type:bugfix +- ID: +- SUG:NA +- DESC:add NULL pointer check when ntpd deletes the last interface + * Wed May 24 2023 chengyechun - 4.2.8p15-9 - Type:CVE - ID:CVE-2023-26551,CVE-2023-26552,CVE-2023-26553,CVE-2023-26554,CVE-2023-26555 -- Gitee