/[packages]/updates/1/foomatic-filters/current/SOURCES/foomatic-filters-4.0.5-CVE-2011-2924.diff
ViewVC logotype

Contents of /updates/1/foomatic-filters/current/SOURCES/foomatic-filters-4.0.5-CVE-2011-2924.diff

Parent Directory Parent Directory | Revision Log Revision Log


Revision 215345 - (show annotations) (download)
Sun Feb 26 17:34:11 2012 UTC (12 years, 1 month ago) by luigiwalser
File size: 1398 byte(s)
- Patch0 from redhat (foomatic-rip options parsing, CVE-2011-2964)
- Patch1 and Patch2 from redhat (tmp file usage, CVE-2011-2924)

1 --- foomaticrip.c 2011-07-25 21:16:29 +0000
2 +++ foomaticrip.c 2011-08-18 19:27:58 +0000
3 @@ -1188,9 +1188,13 @@
4 if (arglist_remove_flag(arglist, "--debug"))
5 debug = 1;
6
7 - if (debug)
8 - logh = fopen(LOG_FILE ".log", "w"); /* insecure, use for debugging only */
9 - else if (quiet && !verbose)
10 + if (debug) {
11 + int fd = mkstemp (LOG_FILE "-XXXXXX.log");
12 + if (fd != -1)
13 + logh = fdopen(fd, "w");
14 + else
15 + logh = stderr;
16 + } else if (quiet && !verbose)
17 logh = NULL; /* Quiet mode, do not log */
18 else
19 logh = stderr; /* Default: log to stderr */
20 @@ -1634,11 +1638,6 @@
21 /* TODO tbd */
22 }
23
24 - /* In debug mode save the data supposed to be fed into the
25 - renderer also into a file, reset the file here */
26 - if (debug)
27 - run_system_process("reset-file", "> " LOG_FILE ".ps");
28 -
29 filename = strtok_r(filelist->data, " ", &p);
30 while (filename) {
31 _log("\n================================================\n\n"
32
33 --- renderer.c 2011-07-24 22:52:26 +0000
34 +++ renderer.c 2011-08-18 19:27:58 +0000
35 @@ -434,7 +434,7 @@
36 }
37
38 /* Save the data supposed to be fed into the renderer also into a file*/
39 - dstrprepend(commandline, "tee -a " LOG_FILE ".ps | ( ");
40 + dstrprepend(commandline, "tee $(mktemp " LOG_FILE "-XXXXXX.ps) | ( ");
41 dstrcat(commandline, ")");
42 }
43
44

  ViewVC Help
Powered by ViewVC 1.1.30