From: Arkadiusz Miśkiewicz Date: Wed, 21 Jun 2017 07:05:38 +0000 (+0200) Subject: - rel 5; prevent one small memleak that could be abused in some recent exploits X-Git-Tag: auto/th/exim-4.89-5 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fexim.git;a=commitdiff_plain;h=454f976 - rel 5; prevent one small memleak that could be abused in some recent exploits --- diff --git a/exim-memleak.patch b/exim-memleak.patch new file mode 100644 index 0000000..8fd83ec --- /dev/null +++ b/exim-memleak.patch @@ -0,0 +1,43 @@ +commit 65e061b76867a9ea7aeeb535341b790b90ae6c21 +Author: Heiko Schlittermann (HS12-RIPE) +Date: Wed May 31 23:08:56 2017 +0200 + + Cleanup (prevent repeated use of -p/-oMr to avoid mem leak) + +diff --git a/src/src/exim.c b/src/src/exim.c +index 67583e58..88e11977 100644 +--- a/src/src/exim.c ++++ b/src/src/exim.c +@@ -3106,7 +3106,14 @@ for (i = 1; i < argc; i++) + + /* -oMr: Received protocol */ + +- else if (Ustrcmp(argrest, "Mr") == 0) received_protocol = argv[++i]; ++ else if (Ustrcmp(argrest, "Mr") == 0) ++ ++ if (received_protocol) ++ { ++ fprintf(stderr, "received_protocol is set already\n"); ++ exit(EXIT_FAILURE); ++ } ++ else received_protocol = argv[++i]; + + /* -oMs: Set sender host name */ + +@@ -3202,7 +3209,15 @@ for (i = 1; i < argc; i++) + + if (*argrest != 0) + { +- uschar *hn = Ustrchr(argrest, ':'); ++ uschar *hn; ++ ++ if (received_protocol) ++ { ++ fprintf(stderr, "received_protocol is set already\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ hn = Ustrchr(argrest, ':'); + if (hn == NULL) + { + received_protocol = argrest; diff --git a/exim.spec b/exim.spec index b1a6b2e..4d771ef 100644 --- a/exim.spec +++ b/exim.spec @@ -24,7 +24,7 @@ Summary(pl.UTF-8): Agent Transferu Poczty Uniwersytetu w Cambridge Summary(pt_BR.UTF-8): Servidor de correio eletrônico exim Name: exim Version: 4.89 -Release: 4 +Release: 5 Epoch: 2 License: GPL Group: Networking/Daemons/SMTP @@ -58,7 +58,7 @@ Patch4: %{name}4-Makefile-Default.patch # http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch Patch5: localscan_dlopen_%{name}_4.20_or_better.patch Patch6: exim-commandline_checks_require_admin.patch - +Patch7: exim-memleak.patch Patch8: %{name}-spam-timeout.patch Patch10: %{name}-force-sigalrm.patch @@ -185,7 +185,7 @@ Pliki nagłówkowe dla Exima. %patch4 -p1 %patch5 -p1 %patch6 -p2 - +%patch7 -p2 %patch8 -p1 %patch10 -p1