From b9e1a114af7583348e0c2b6fb75245f0e0c4b6ec Mon Sep 17 00:00:00 2001 From: "renmingshuai@huawei.com" Date: Mon, 9 Jan 2023 19:28:29 +0800 Subject: [PATCH] fix possible NULL deref when built without FIDO Signed-off-by: renmingshuai@huawei.com --- ...e-NULL-deref-when-built-without-FIDO.patch | 33 +++++++++++++++++++ openssh.spec | 10 +++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 backport-fix-possible-NULL-deref-when-built-without-FIDO.patch diff --git a/backport-fix-possible-NULL-deref-when-built-without-FIDO.patch b/backport-fix-possible-NULL-deref-when-built-without-FIDO.patch new file mode 100644 index 0000000..8421498 --- /dev/null +++ b/backport-fix-possible-NULL-deref-when-built-without-FIDO.patch @@ -0,0 +1,33 @@ +From 7d25b37fb2a5ff4dadabcbdac6087a97479434f5 Mon Sep 17 00:00:00 2001 +From: Damien Miller +Date: Fri, 24 Jun 2022 13:46:39 +1000 +Subject: [PATCH] fix possible NULL deref when built without FIDO + +Analysis/fix from kircher in bz3443; ok dtucker@ + +Reference:https://github.com/openssh/openssh-portable/commit/7d25b37fb2a5ff +Conflict:NA +--- + ssh-sk.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ssh-sk.c b/ssh-sk.c +index a1ff5cc4..ba514607 100644 +--- a/ssh-sk.c ++++ b/ssh-sk.c +@@ -127,10 +127,11 @@ sshsk_open(const char *path) + ret->sk_enroll = ssh_sk_enroll; + ret->sk_sign = ssh_sk_sign; + ret->sk_load_resident_keys = ssh_sk_load_resident_keys; ++ return ret; + #else + error("internal security key support not enabled"); ++ goto fail; + #endif +- return ret; + } + if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL) { + error("Provider \"%s\" dlopen failed: %s", path, dlerror()); +-- +2.23.0 + diff --git a/openssh.spec b/openssh.spec index 33513fb..0c4716e 100644 --- a/openssh.spec +++ b/openssh.spec @@ -6,7 +6,7 @@ %{?no_gtk2:%global gtk2 0} %global sshd_uid 74 -%global openssh_release 16 +%global openssh_release 17 Name: openssh Version: 8.8p1 @@ -106,6 +106,7 @@ Patch75: backport-upstream-avoid-integer-overflow-of-auth-attempts-har.pa Patch76: backport-Skip-scp3-test-if-there-s-no-scp-on-remote-path.patch Patch77: skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch Patch78: skip-tests-for-C-if-there-is-no-openssl-on-local-pat.patch +Patch79: backport-fix-possible-NULL-deref-when-built-without-FIDO.patch Requires: /sbin/nologin Requires: libselinux >= 2.3-5 audit-libs >= 1.0.8 @@ -262,6 +263,7 @@ popd %patch76 -p1 %patch77 -p1 %patch78 -p1 +%patch79 -p1 autoreconf pushd pam_ssh_agent_auth-pam_ssh_agent_auth-0.10.4 @@ -460,6 +462,12 @@ getent passwd sshd >/dev/null || \ %attr(0644,root,root) %{_mandir}/man8/sftp-server.8* %changelog +* Mon Jan 9 2023 renmingshuai - 8.8p1-17 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix possible NULL deref when built without FIDO + * Tue Jan 3 2023 renmingshuai - 8.8p1-16 - Type:bugfix - CVE:NA -- Gitee