diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2022-02-25 17:37:51 -0800 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2022-02-25 17:37:51 -0800 |
commit | 126e92820579e58d391f55fdfefe425a685fc217 (patch) | |
tree | 94981178e2fc0524d480b36c3f30cf24726506f7 /net-misc | |
parent | net-misc/openssh: Add patches for bugs #834019 and #834037 (diff) | |
download | gentoo-126e92820579e58d391f55fdfefe425a685fc217.tar.gz gentoo-126e92820579e58d391f55fdfefe425a685fc217.tar.bz2 gentoo-126e92820579e58d391f55fdfefe425a685fc217.zip |
net-misc/openssh: Add patch to fix #834044
I can't reproduce this locally, however this should be a fairly simple
fix.
Closes: https://bugs.gentoo.org/834044
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/openssh/files/openssh-8.9_p1-X509-glue-13.3.patch | 13 | ||||
-rw-r--r-- | net-misc/openssh/files/openssh-8.9_p1-gss-use-HOST_NAME_MAX.patch | 27 | ||||
-rw-r--r-- | net-misc/openssh/openssh-8.9_p1.ebuild | 1 |
3 files changed, 40 insertions, 1 deletions
diff --git a/net-misc/openssh/files/openssh-8.9_p1-X509-glue-13.3.patch b/net-misc/openssh/files/openssh-8.9_p1-X509-glue-13.3.patch index 66617a17af2a..7c7767109dd5 100644 --- a/net-misc/openssh/files/openssh-8.9_p1-X509-glue-13.3.patch +++ b/net-misc/openssh/files/openssh-8.9_p1-X509-glue-13.3.patch @@ -1,6 +1,6 @@ diff -ur '--exclude=.*.un~' a/openssh-8.9p1+x509-13.3.diff b/openssh-8.9p1+x509-13.3.diff --- a/openssh-8.9p1+x509-13.3.diff 2022-02-24 17:19:30.830285922 -0800 -+++ b/openssh-8.9p1+x509-13.3.diff 2022-02-25 16:56:00.750829460 -0800 ++++ b/openssh-8.9p1+x509-13.3.diff 2022-02-25 17:35:40.885492007 -0800 @@ -993,15 +993,16 @@ char b[512]; - size_t len = ssh_digest_bytes(SSH_DIGEST_SHA512); @@ -21,6 +21,17 @@ diff -ur '--exclude=.*.un~' a/openssh-8.9p1+x509-13.3.diff b/openssh-8.9p1+x509- (void)snprintf(b, sizeof b, "%llu%s", (unsigned long long)options.timing_secret, user); - if (ssh_digest_memory(SSH_DIGEST_SHA512, b, strlen(b), hash, len) != 0) +@@ -44573,8 +44574,8 @@ + gss_create_empty_oid_set(&status, &oidset); + gss_add_oid_set_member(&status, ctx->oid, &oidset); + +-- if (gethostname(lname, MAXHOSTNAMELEN)) { +-+ if (gethostname(lname, MAXHOSTNAMELEN) == -1) { ++- if (gethostname(lname, HOST_NAME_MAX)) { +++ if (gethostname(lname, HOST_NAME_MAX) == -1) { + gss_release_oid_set(&status, &oidset); + return (-1); + } @@ -51970,7 +51971,7 @@ diff -ruN openssh-8.9p1/m4/openssh.m4 openssh-8.9p1+x509-13.3/m4/openssh.m4 --- openssh-8.9p1/m4/openssh.m4 2022-02-23 13:31:11.000000000 +0200 diff --git a/net-misc/openssh/files/openssh-8.9_p1-gss-use-HOST_NAME_MAX.patch b/net-misc/openssh/files/openssh-8.9_p1-gss-use-HOST_NAME_MAX.patch new file mode 100644 index 000000000000..98c87ecf5f47 --- /dev/null +++ b/net-misc/openssh/files/openssh-8.9_p1-gss-use-HOST_NAME_MAX.patch @@ -0,0 +1,27 @@ +diff --git a/gss-serv.c b/gss-serv.c +index b5d4bb2d..00e3d118 100644 +--- a/gss-serv.c ++++ b/gss-serv.c +@@ -105,7 +105,7 @@ ssh_gssapi_acquire_cred(Gssctxt *ctx) + gss_create_empty_oid_set(&status, &oidset); + gss_add_oid_set_member(&status, ctx->oid, &oidset); + +- if (gethostname(lname, MAXHOSTNAMELEN)) { ++ if (gethostname(lname, HOST_NAME_MAX)) { + gss_release_oid_set(&status, &oidset); + return (-1); + } +diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c +index 2e065ba3..4ce80cb2 100644 +--- a/sandbox-seccomp-filter.c ++++ b/sandbox-seccomp-filter.c +@@ -276,6 +276,9 @@ static const struct sock_filter preauth_insns[] = { + #ifdef __NR_ppoll + SC_ALLOW(__NR_ppoll), + #endif ++#ifdef __NR_ppoll_time64 ++ SC_ALLOW(__NR_ppoll_time64), ++#endif + #ifdef __NR_poll + SC_ALLOW(__NR_poll), + #endif diff --git a/net-misc/openssh/openssh-8.9_p1.ebuild b/net-misc/openssh/openssh-8.9_p1.ebuild index bb334274000e..562d5b5a4914 100644 --- a/net-misc/openssh/openssh-8.9_p1.ebuild +++ b/net-misc/openssh/openssh-8.9_p1.ebuild @@ -128,6 +128,7 @@ src_prepare() { eapply "${FILESDIR}"/${PN}-8.0_p1-deny-shmget-shmat-shmdt-in-preauth-privsep-child.patch eapply "${FILESDIR}"/${PN}-8.9_p1-allow-ppoll_time64.patch #834019 eapply "${FILESDIR}"/${PN}-8.9_p1-fzero-call-used-regs.patch #834037 + eapply "${FILESDIR}"/${PN}-8.9_p1-gss-use-HOST_NAME_MAX.patch #834044 [[ -d ${WORKDIR}/patches ]] && eapply "${WORKDIR}"/patches |