aboutsummaryrefslogtreecommitdiff
Fix CVE-2020-10595:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10595

Patch copied from upstream advisory:

https://seclists.org/oss-sec/2020/q1/128

diff --git a/prompting.c b/prompting.c
index e985d95..d81054f 100644
--- a/prompting.c
+++ b/prompting.c
@@ -314,26 +314,27 @@ pamk5_prompter_krb5(krb5_context context UNUSED, void *data, const char *name,
     /*
      * Reuse pam_prompts as a starting index and copy the data into the reply
      * area of the krb5_prompt structs.
      */
     pam_prompts = 0;
     if (name != NULL && !args->silent)
         pam_prompts++;
     if (banner != NULL && !args->silent)
         pam_prompts++;
     for (i = 0; i < num_prompts; i++, pam_prompts++) {
-        size_t len;
+        size_t len, allowed;

         if (resp[pam_prompts].resp == NULL)
             goto cleanup;
         len = strlen(resp[pam_prompts].resp);
-        if (len > prompts[i].reply->length)
+        allowed = prompts[i].reply->length;
+        if (allowed == 0 || len > allowed - 1)
             goto cleanup;

         /*
          * The trailing nul is not included in length, but other applications
          * expect it to be there.  Therefore, we copy one more byte than the
          * actual length of the password, but set length to just the length of
          * the password.
          */
         memcpy(prompts[i].reply->data, resp[pam_prompts].resp, len + 1);
         prompts[i].reply->length = (unsigned int) len;
hooses different strings for user and group, this wouldn't show up. * gnu/services/version-control.scm (gitolite-accounts): Use the correct variable for the name of a (user-group ...). Signed-off-by: Christopher Baines <mail@cbaines.net> EuAndreh 2022-11-07services: gitolite: Add local-code configuration option....* gnu/services/version-control.scm (gitolite-rc-file): Add local-code field. (gitolite-rc-file-compiler): Serialize the field. * doc/guix.texi: Document it. Signed-off-by: Christopher Baines <mail@cbaines.net> Alexey Abramov 2022-10-17guix: Fix typos....These typos were found and reported through weblate. * gnu/packages/audio.scm (wildmidi)[description]: Fix typo. * gnu/packages/games.scm (cgoban)[description]: Fix typo. * gnu/services/version-control.scm (gitolite-service-type)[description]: Fix typo. * gnu/installer/newt/substitutes.scm (run-substitutes-page): Remove full stop at end of title. * gnu/machine/ssh.scm (machine-ssh-configuration-system): Move punctuation outside of quotes. * guix/scripts/home.scm (process-action): Remove trailing space before newline. * guix/scripts/system.scm (show-help): Fix typo. * guix/scripts/environment.scm (with-store/maybe): Fix typo. Julien Lepiller