Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.05] openssh: add backported security fix patches #323761

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkgs/tools/networking/openssh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ in
hash = "sha256-SQQm92bYKidj/KzY2D6j1weYdQx70q/y5X3FZg93P/0=";
};

extraPatches = [ ./ssh-keysign-8.5.patch ];
extraPatches = [
./ssh-keysign-8.5.patch
./openssh-9.6_p1-CVE-2024-6387.patch
./openssh-9.6_p1-chaff-logic.patch
];
extraMeta.maintainers = lib.teams.helsinki-systems.members;
};

Expand Down
19 changes: 19 additions & 0 deletions pkgs/tools/networking/openssh/openssh-9.6_p1-CVE-2024-6387.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
https://bugs.gentoo.org/935271
Backport proposed by upstream at https://marc.info/?l=oss-security&m=171982317624594&w=2.
--- a/log.c
+++ b/log.c
@@ -451,12 +451,14 @@ void
sshsigdie(const char *file, const char *func, int line, int showfunc,
LogLevel level, const char *suffix, const char *fmt, ...)
{
+#ifdef SYSLOG_R_SAFE_IN_SIGHAND
va_list args;

va_start(args, fmt);
sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
suffix, fmt, args);
va_end(args);
+#endif
_exit(1);
}

16 changes: 16 additions & 0 deletions pkgs/tools/networking/openssh/openssh-9.6_p1-chaff-logic.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"Minor logic error in ObscureKeystrokeTiming"
https://marc.info/?l=oss-security&m=171982317624594&w=2
--- a/clientloop.c
+++ b/clientloop.c
@@ -608,8 +608,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout,
if (timespeccmp(&now, &chaff_until, >=)) {
/* Stop if there have been no keystrokes for a while */
stop_reason = "chaff time expired";
- } else if (timespeccmp(&now, &next_interval, >=)) {
- /* Otherwise if we were due to send, then send chaff */
+ } else if (timespeccmp(&now, &next_interval, >=) &&
+ !ssh_packet_have_data_to_write(ssh)) {
+ /* If due to send but have no data, then send chaff */
if (send_chaff(ssh))
nchaff++;
}
Loading