summaryrefslogtreecommitdiff
blob: 1df42a038714bb81151a421e7c14b440ddfeba29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE glsa SYSTEM "http://www.gentoo.org/dtd/glsa.dtd">
<glsa id="200410-04">
  <title>PHP: Memory disclosure and arbitrary location file upload</title>
  <synopsis>
    Two bugs in PHP may allow the disclosure of portions of memory and allow
    remote attackers to upload files to arbitrary locations.
  </synopsis>
  <product type="ebuild">PHP</product>
  <announced>2004-10-06</announced>
  <revised count="01">2004-10-06</revised>
  <bug>64223</bug>
  <access>remote</access>
  <affected>
    <package name="dev-php/php" auto="yes" arch="*">
      <unaffected range="ge">4.3.9 </unaffected>
      <vulnerable range="lt">4.3.9</vulnerable>
    </package>
    <package name="dev-php/mod_php" auto="yes" arch="*">
      <unaffected range="ge">4.3.9</unaffected>
      <vulnerable range="lt">4.3.9</vulnerable>
    </package>
    <package name="dev-php/php-cgi" auto="yes" arch="*">
      <unaffected range="ge">4.3.9</unaffected>
      <vulnerable range="lt">4.3.9</vulnerable>
    </package>
  </affected>
  <background>
    <p>
    PHP is a general-purpose scripting language widely used to develop
    web-based applications. It can run inside a web server using the mod_php
    module or the CGI version of PHP, or can run stand-alone in a CLI.
    </p>
  </background>
  <description>
    <p>
    Stefano Di Paola discovered two bugs in PHP. The first is a parse error in
    php_variables.c that could allow a remote attacker to view the contents of
    the target machine's memory. Additionally, an array processing error in the
    SAPI_POST_HANDLER_FUNC() function inside rfc1867.c could lead to the
    $_FILES array being overwritten.
    </p>
  </description>
  <impact type="normal">
    <p>
    A remote attacker could exploit the first vulnerability to view memory
    contents. On a server with a script that provides file uploads, an attacker
    could exploit the second vulnerability to upload files to an arbitrary
    location. On systems where the HTTP server is allowed to write in a
    HTTP-accessible location, this could lead to remote execution of arbitrary
    commands with the rights of the HTTP server.
    </p>
  </impact>
  <workaround>
    <p>
    There is no known workaround at this time.
    </p>
  </workaround>
  <resolution>
    <p>
    All PHP, mod_php and php-cgi users should upgrade to the latest stable
    version:
    </p>
    <code>
    # emerge sync

    # emerge -pv "&gt;=dev-php/php-4.3.9"
    # emerge "&gt;=dev-php/php-4.3.9"

    # emerge -pv "&gt;=dev-php/mod_php-4.3.9"
    # emerge "&gt;=dev-php/mod_php-4.3.9"

    # emerge -pv "&gt;=dev-php/php-cgi-4.3.9"
    # emerge "&gt;=dev-php/php-cgi-4.3.9"</code>
  </resolution>
  <references>
    <uri link="https://secunia.com/advisories/12560/">Secunia Advisory</uri>
    <uri link="http://www.securityfocus.com/archive/1/375294">BugTraq post regarding the php_variables.c issue</uri>
    <uri link="http://www.securityfocus.com/archive/1/375370">BugTraq post regarding the rfc1867.c issue</uri>
  </references>
  <metadata tag="requester" timestamp="2004-09-29T20:40:17Z">
    dmargoli
  </metadata>
  <metadata tag="bugReady" timestamp="2004-09-30T20:25:12Z">
    koon
  </metadata>
  <metadata tag="submitter" timestamp="2004-10-03T18:04:56Z">
    dmargoli
  </metadata>
</glsa>