merge mr-CVE-2026-40685 into openEuler-24.03-LTS-SP3
2 file(s) changed+56-1
ACVE-2026-40685.patch+48-0
| @@ -0,0 +1,48 @@ | |||
| 1 | +--- a/src/string.c 2023-12-26 02:42:52.000000000 +0800 | ||
| 2 | ++++ b/src/string.c 2026-05-05 21:38:50.229117757 +0800 | ||
| 3 | +@@ -606,17 +606,17 @@ | ||
| 4 | + uschar * ss = yield = store_get(Ustrlen(s) + 1, GET_TAINTED); /* always treat as tainted */ | ||
| 5 | + | ||
| 6 | + while (*s) | ||
| 7 | +- { | ||
| 8 | + if (*s != '\\') | ||
| 9 | + *ss++ = *s++; | ||
| 10 | +- else if (isdigit(s[1])) | ||
| 11 | +- { | ||
| 12 | +- *ss++ = (s[1] - '0')*100 + (s[2] - '0')*10 + s[3] - '0'; | ||
| 13 | +- s += 4; | ||
| 14 | ++ else if (isdigit(*++s)) /* Apparently, musl libc dn_expand seen doing \\DD */ | ||
| 15 | ++ { /* and \D also. We can only hope not when a real digit follows. */ | ||
| 16 | ++ uschar c = *s++ - '0'; | ||
| 17 | ++ if (isdigit(*s)) c = c * 10 + *s++ - '0'; | ||
| 18 | ++ if (isdigit(*s)) c = c * 10 + *s++ - '0'; | ||
| 19 | ++ *ss++ = c; | ||
| 20 | + } | ||
| 21 | + else if (*++s) | ||
| 22 | + *ss++ = *s++; | ||
| 23 | +- } | ||
| 24 | + | ||
| 25 | + *ss = 0; | ||
| 26 | + return yield; | ||
| 27 | +@@ -928,7 +928,11 @@ | ||
| 28 | + { | ||
| 29 | + if (*s == '<' && (ispunct(s[1]) || iscntrl(s[1]))) | ||
| 30 | + { | ||
| 31 | +- sep = s[1]; | ||
| 32 | ++ if (!is_tainted(s)) | ||
| 33 | ++ sep = s[1]; | ||
| 34 | ++ else DEBUG(D_any) | ||
| 35 | ++ debug_printf("attempt to use tainted change-of-seperator spec (%s %d)\n", | ||
| 36 | ++ config_filename, config_lineno); | ||
| 37 | + if (*++s) ++s; | ||
| 38 | + while (isspace(*s) && *s != sep) s++; | ||
| 39 | + } | ||
| 40 | +@@ -955,7 +959,7 @@ | ||
| 41 | + die_tainted(US"string_nextinlist", func, line); | ||
| 42 | + for (; *s; s++) | ||
| 43 | + { | ||
| 44 | +- if (*s == sep && (*(++s) != sep || sep_is_special)) break; | ||
| 45 | ++ if (*s == sep && (*++s != sep || sep_is_special)) break; | ||
| 46 | + if (p < buflen - 1) buffer[p++] = *s; | ||
| 47 | + } | ||
| 48 | + while (p > 0 && isspace(buffer[p-1])) p--; | ||
Mexim.spec+8-1
Comments
Sign in to comment