void-packages/srcpkgs/cvs/patches/ssh.patch
Đoàn Trần Công Danh 7286edb4e8 cvs: import patches from Gentoo
While we are at it, fix build with newer gcc
2024-06-16 13:00:49 +07:00

23 lines
573 B
Diff

Fix for CVE-2017-12836, extracted from MirBSD repository.
--- a/src/rsh-client.c
+++ b/src/rsh-client.c
@@ -97,6 +97,9 @@ start_rsh_server (cvsroot_t *root, struc
rsh_argv[i++] = root->username;
}
+ /* Only non-option arguments from here. (CVE-2017-12836) */
+ rsh_argv[i++] = "--";
+
rsh_argv[i++] = root->hostname;
rsh_argv[i++] = cvs_server;
rsh_argv[i++] = "server";
@@ -171,6 +174,8 @@ start_rsh_server (cvsroot_t *root, struc
*p++ = root->username;
}
+ *p++ = "--";
+
*p++ = root->hostname;
*p++ = command;
*p++ = NULL;