From 8384875e7d73d36b058d081012780d7d8148e1a4 Mon Sep 17 00:00:00 2001 From: "renmingshuai@huawei.com" Date: Mon, 9 Jan 2023 19:40:00 +0800 Subject: [PATCH] fix possible NULL deref when built without FIDO --- ...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 48c80ed..57d97aa 100644 --- a/openssh.spec +++ b/openssh.spec @@ -6,7 +6,7 @@ %{?no_gtk2:%global gtk2 0} %global sshd_uid 74 -%global openssh_release 25 +%global openssh_release 26 Name: openssh Version: 8.2p1 @@ -100,6 +100,7 @@ Patch66: backport-change-convtime-form-returning-long-to-returning-int.pa Patch67: backport-change-types-in-convtime-unit-test-to-int-to-match.patch Patch68: feature-add-SMx-support.patch Patch69: backport-upstream-ssh-keygen-Y-check-novalidate-requires-name.patch +Patch70: backport-fix-possible-NULL-deref-when-built-without-FIDO.patch Requires: /sbin/nologin Requires: libselinux >= 2.3-5 audit-libs >= 1.0.8 @@ -272,6 +273,7 @@ popd %patch67 -p1 %patch68 -p1 %patch69 -p1 +%patch70 -p1 autoreconf pushd pam_ssh_agent_auth-0.10.3 @@ -481,6 +483,12 @@ getent passwd sshd >/dev/null || \ %attr(0644,root,root) %{_mandir}/man8/sftp-server.8* %changelog +* Mon Jan 09 2023 renmingshuai - 8.2p1-26 +- Type:bugfix +- CVE: +- SUG:NA +- DESC:fix possible NULL deref when built without FIDO + * Tue Jan 03 2023 renmingshuai - 8.2p1-25 - Type:bugfix - CVE: -- Gitee