!68 backport some patches from upstream

From: @tmacbb 
Reviewed-by: @zengwefeng 
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2023-06-25 01:47:21 +00:00 committed by Gitee
commit 99930e20c3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 45 additions and 2 deletions

View File

@ -0,0 +1,37 @@
From 6f92672308e9ff2ff72f1d929b6887ab24787e42 Mon Sep 17 00:00:00 2001
From: Harlen Stenn <stenn@ntp.org>
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

View File

@ -2,7 +2,7 @@
Name: ntp
Version: 4.2.8p14
Release: 8
Release: 9
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/
@ -28,7 +28,7 @@ Patch5: bugfix-MD5-manpage.patch
Patch6: backport-CVE-2020-15025.patch
Patch7: backport-CVE-2023-26551-CVE-2023-26552-CVE-2023-26553-CVE-2023-26554.patch
Patch8: backport-CVE-2023-26555-fix-out-write-bounds-in-praecis_parse.patch
Patch9: 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
Requires(pre): shadow-utils autogen >= 5.18.16
@ -211,6 +211,12 @@ make check
%{_mandir}/man8/*.8*
%changelog
* Wed Jun 21 2023 liubo <liubo335@huawei.com> - 4.2.8p14-9
- Type:bugfix
- ID:
- SUG:NA
- DESC:add NULL pointer check when ntpd deletes the last interface
* Wed May 24 2023 chengyechun <chengyechun1@huawei.com> - 4.2.8p14-8
- Type:CVE
- ID:CVE-2023-26551,CVE-2023-26552,CVE-2023-26553,CVE-2023-26554,CVE-2023-26555