diff --git a/backport-CVE-2020-15025.patch b/backport-CVE-2020-15025.patch new file mode 100644 index 0000000000000000000000000000000000000000..17c4969e8465bf7c05935bf295f514e43cdf8dd2 --- /dev/null +++ b/backport-CVE-2020-15025.patch @@ -0,0 +1,39 @@ +Subject: [PATCH] memory leak with AES128CMAC keys + +Reference:https://archive.ntp.org/ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz + +--- + libntp/a_md5encrypt.c | 2 +- + sntp/crypto.c | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/libntp/a_md5encrypt.c b/libntp/a_md5encrypt.c +index 8c046f4..57100de 100644 +--- a/libntp/a_md5encrypt.c ++++ b/libntp/a_md5encrypt.c +@@ -93,7 +93,7 @@ make_mac( + } + cmac_fail: + if (ctx) +- CMAC_CTX_cleanup(ctx); ++ CMAC_CTX_free(ctx); + } + else + # endif /*ENABLE_CMAC*/ +diff --git a/sntp/crypto.c b/sntp/crypto.c +index 8ffe006..8a47ede 100644 +--- a/sntp/crypto.c ++++ b/sntp/crypto.c +@@ -70,7 +70,8 @@ compute_mac( + } + len = (u_int)slen; + +- CMAC_CTX_cleanup(ctx); ++ if (ctx) ++ CMAC_CTX_free(ctx); + /* Test our AES-128-CMAC implementation */ + + } else /* MD5 MAC handling */ +-- +1.8.3.1 + diff --git a/ntp.spec b/ntp.spec index 0e95277d09c5f2506f573e76d00b75f389d003f8..6b8804dbadc254c77027d7144379f063044e29fc 100644 --- a/ntp.spec +++ b/ntp.spec @@ -2,7 +2,7 @@ Name: ntp Version: 4.2.8p14 -Release: 4 +Release: 5 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/ @@ -22,9 +22,9 @@ Source15: sntp.service Source16: sntp.sysconfig Patch1: ntp-ssl-libs.patch Patch2: ntp-psl-def.patch - -Patch9000: bugfix-fix-bind-port-in-debug-mode.patch -Patch9001: bugfix-fix-ifindex-length.patch +Patch3: bugfix-fix-bind-port-in-debug-mode.patch +Patch4: bugfix-fix-ifindex-length.patch +Patch5: backport-CVE-2020-15025.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 @@ -208,6 +208,12 @@ make check %{_mandir}/man8/*.8* %changelog +* Thu Mar 10 2022 renmingshuai - 4.2.8p15-5 +- Type:cves +- ID:NA +- SUG:NA +- DESC: fix CVE-2020-15025 and modify the number of some patches + * Sat Dec 4 2021 renmingshuai - 4.2.8p15-4 - Type:bugfix - ID:NA