Open
Fix CVE-2026-40685: OOB heap write in JSON lookup #34
zhengdeAdd on May 5
Fix CVE-2026-40685: OOB heap write in JSON lookup #34
Open
Total: 2 files changed+56-1
| @@ -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--; | ||
| @@ -4,7 +4,7 @@ | |||
| 4 | Summary: The exim mail transfer agent | 4 | Summary: The exim mail transfer agent |
| 5 | Name: exim | 5 | Name: exim |
| 6 | Version: 4.97.1 | 6 | Version: 4.97.1 |
| 7 | -Release: 2 | 7 | +Release: 3 |
| 8 | License: GPLv2+ | 8 | License: GPLv2+ |
| 9 | Url: https://www.exim.org/ | 9 | Url: https://www.exim.org/ |
| 10 | 10 | ||
| @@ -40,6 +40,7 @@ Patch1: exim-4.94-libdir.patch | |||
| 40 | Patch2: exim-4.97-dlopen-localscan.patch | 40 | Patch2: exim-4.97-dlopen-localscan.patch |
| 41 | Patch3: exim-4.96-pic.patch | 41 | Patch3: exim-4.96-pic.patch |
| 42 | Patch4: CVE-2023-51766.patch | 42 | Patch4: CVE-2023-51766.patch |
| 43 | +Patch5: CVE-2026-40685.patch | ||
| 43 | 44 | ||
| 44 | Requires: /etc/pki/tls/certs /etc/pki/tls/private | 45 | Requires: /etc/pki/tls/certs /etc/pki/tls/private |
| 45 | Requires: setup | 46 | Requires: setup |
| @@ -480,6 +481,12 @@ fi | |||
| 480 | %{_sysconfdir}/cron.daily/greylist-tidy.sh | 481 | %{_sysconfdir}/cron.daily/greylist-tidy.sh |
| 481 | 482 | ||
| 482 | %changelog | 483 | %changelog |
| 484 | +* Tue May 05 2026 lizhengde <lizhengde@xfusion.com> - 4.97.1-3 | ||
| 485 | +- Type:CVE | ||
| 486 | +- CVE:CVE-2026-40685 | ||
| 487 | +- SUG:NA | ||
| 488 | +- DESC:fix CVE-2026-40685 | ||
| 489 | + | ||
| 483 | * Tue Jul 9 2024 technology208 <technology@208suo.com> - 4.97-2 | 490 | * Tue Jul 9 2024 technology208 <technology@208suo.com> - 4.97-2 |
| 484 | - Fix CVE-2023-51766 | 491 | - Fix CVE-2023-51766 |
| 485 | 492 | ||