• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libfcgi/0006-fix-CVE-2012-6687.patch
niranjan.reddyniranjan.reddy committed 2311d54ec4a01 Mar 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
libfcgi:add security patch for CVE-2012-6687
2
CVE-2012-6687 - remote attackers cause a denial of service (crash) via a large number 
3
of connections (http://www.cvedetails.com/cve/CVE-2012-6687/).
4
Fix:use poll in os_unix.c instead of select to avoid problem with > 1024 connections.
5
This patch libfcgi_2.4.0-8.3.debian.tar.xz is pulled from the below link:
6
(https://launchpad.net/ubuntu/+source/libfcgi/2.4.0-8.3)
7
The next release of libfcgi is 2.4.1 which may have this fix is yet to be released 
8
officially.
9
​
10
Signed-off-by: Anton Kortunov <toshic.toshic@gmail.com>
11
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
12
​
13
Index: b/libfcgi/os_unix.c
14
===================================================================
15
--- a/libfcgi/os_unix.c
16
+++ b/libfcgi/os_unix.c
17
@@ -42,6 +42,7 @@
18
 #include <sys/time.h>
19
 #include <sys/un.h>
20
 #include <signal.h>
21
+#include <poll.h>
22
 
23
 #ifdef HAVE_NETDB_H
24
 #include <netdb.h>
25
@@ -103,6 +104,9 @@
26
 static int shutdownPending = FALSE;
27
 static int shutdownNow = FALSE;
28
 
29
+static int libfcgiOsClosePollTimeout = 2000;
30
+static int libfcgiIsAfUnixKeeperPollTimeout = 2000;
31
+
32
 void OS_ShutdownPending()
33
 {
34
     shutdownPending = TRUE;
35
@@ -168,6 +172,16 @@
36
     if(libInitialized)
37
         return 0;
38
 
39
+    char *libfcgiOsClosePollTimeoutStr = getenv( "LIBFCGI_OS_CLOSE_POLL_TIMEOUT" );
40
+    if(libfcgiOsClosePollTimeoutStr) {
41
+        libfcgiOsClosePollTimeout = atoi(libfcgiOsClosePollTimeoutStr);
42
+    }
43
+
44
+    char *libfcgiIsAfUnixKeeperPollTimeoutStr = getenv( "LIBFCGI_IS_AF_UNIX_KEEPER_POLL_TIMEOUT" );
45
+    if(libfcgiIsAfUnixKeeperPollTimeoutStr) {
46
+        libfcgiIsAfUnixKeeperPollTimeout = atoi(libfcgiIsAfUnixKeeperPollTimeoutStr);
47
+    }
48
+
49
     asyncIoTable = (AioInfo *)malloc(asyncIoTableSize * sizeof(AioInfo));
50
     if(asyncIoTable == NULL) {
51
         errno = ENOMEM;
52
@@ -755,19 +769,16 @@
53
 
54
     if (shutdown(fd, 1) == 0)
55
     {
56
-        struct timeval tv;
57
-        fd_set rfds;
58
+        struct pollfd pfd;
59
         int rv;
60
         char trash[1024];
61
 
62
-        FD_ZERO(&rfds);
63
+        pfd.fd = fd;
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.