<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>PHP Security Blog</title>
    <link>http://blog.php-security.org/</link>
    <description></description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:" />
    <generator>Serendipity 3.1.4159 - http://www.s9y.org/</generator>
    
    <image>
        <url>http://blog.php-security.org/layout/default/img/s9y_banner_small.png</url>
        <title>RSS: PHP Security Blog - </title>
        <link>http://blog.php-security.org/</link>
        <width>100</width>
        <height>21</height>
    </image>
<item>
    <title>This blog is dead</title>
    <link>http://blog.php-security.org/archives/96-This-blog-is-dead.html</link>
<category>PHP</category><category>Security</category><category>Standards</category>    <comments>http://blog.php-security.org/archives/96-This-blog-is-dead.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=96</wfw:comment>
    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=96</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;p&gt;This blog is finally dead.&lt;/p&gt;&lt;p&gt;Because the domain name limited me to blog about PHP security only I moved to the domain &lt;a href=&quot;http://www.suspekt.org/&quot;&gt;suspekt.org&lt;/a&gt; that I own for many years now. Please update all your links and feeds to point to the new URL where I will continue blogging on a regular basis.&lt;/p&gt;&lt;br /&gt;
    </content:encoded>
    <pubDate>Fri, 01 Aug 2008 09:16:42 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/96-guid.html</guid>
    </item>
<item>
    <title>Flash Game - 10000 of 900 possible points?!?!?</title>
    <link>http://blog.php-security.org/archives/95-Flash-Game-10000-of-900-possible-points!!.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/95-Flash-Game-10000-of-900-possible-points!!.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=95</wfw:comment>
    <slash:comments>14</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=95</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;p&gt;A friend of mine just sent me the URL to a flash game (for obvious reasons I will not share the link) which is part of a number of games with a price of 10.000 EUR in the end. One would believe that a game with such a price money is secure. Especially when the organising party is an internet provider.&lt;/p&gt;&lt;p /&gt;&lt;p&gt;&lt;br /&gt;But guess what... At the end of the flash game you can optionally submit your score to the highscore server, which results in a POST to the file &lt;i&gt;submithigh.php&lt;/i&gt; with several parameters, one parameter saying&lt;i&gt; score=XXXX&lt;/i&gt;. And of course you can submit whatever score you want. So now I lead the highscore with 10000 of about 900 possible points. I set it that high to ensure that the guys at the ISP will realize that this is faked, but imagine I had just increased the current highscore by 10. I seriously doubt anyone would have noticed and I would have won the competition without even decompiling the flash.&lt;/p&gt;&lt;p /&gt;&lt;p /&gt;&lt;br /&gt;&lt;a href=&quot;http://blog.php-security.org/archives/95-guid.html#extended&quot;&gt;Continue reading &quot;Flash Game - 10000 of 900 possible points?!?!?&quot;&lt;/a&gt;    </content:encoded>
    <pubDate>Tue, 11 Dec 2007 23:05:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/95-guid.html</guid>
    </item>
<item>
    <title>Suhosin 0.9.21 - XSS Protection</title>
    <link>http://blog.php-security.org/archives/94-Suhosin-0.9.21-XSS-Protection.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/94-Suhosin-0.9.21-XSS-Protection.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=94</wfw:comment>
    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=94</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;p&gt;It has been a very long time since the last Suhosin extension has been released, but today this has changed with the release of &lt;a href=&quot;http://www.suhosin.org&quot;&gt;Suhosin 0.9.21&lt;/a&gt;. Among the changes are two new features that will protect applications that put too much trust into the &lt;i&gt;SERVER&lt;/i&gt; variables from several &lt;i&gt;XSS&lt;/i&gt; (and &lt;i&gt;SQL injection&lt;/i&gt;) attacks. These features are &lt;i&gt;suhosin.server.strip&lt;/i&gt; and &lt;i&gt;suhosin.server.encode&lt;/i&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;suhosin.server.strip&lt;/b&gt;&lt;/p&gt;&lt;p&gt;When activated (which is the default) the &lt;i&gt;SERVER&lt;/i&gt; variables &lt;i&gt;PHP_SELF&lt;/i&gt;, &lt;i&gt;PATH_INFO&lt;/i&gt; and &lt;i&gt;PATH_TRANSLATED&lt;/i&gt; will be scanned for the characters &amp;lt; &amp;gt; ' &amp;quot; and `. All occurences will be replaced by ? characters. This stops a lot of &lt;i&gt;XSS&lt;/i&gt; attacks, because many &lt;a href=&quot;http://www.php.net&quot;&gt;PHP&lt;/a&gt; applications consider these variables not tainted.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;suhosin.server.encode&lt;/b&gt;&lt;/p&gt;&lt;p&gt;When activated (which is the default) the &lt;i&gt;SERVER&lt;/i&gt; variables &lt;i&gt;REQUEST_URI&lt;/i&gt; and &lt;i&gt;QUERY_STRING&lt;/i&gt; will be scanned for the characters &amp;lt; &amp;gt; ' &amp;quot; and `. All these characters are usually encoded by the browser before they are sent and therefore many applications consider &lt;i&gt;REQUEST_URI&lt;/i&gt; and &lt;i&gt;QUERY_STRING&lt;/i&gt; safe. However some browsers like Internet Explorer will not encode these characters which results in lots of &lt;i&gt;XSS&lt;/i&gt; vulnerabilities. &lt;a href=&quot;http://www.suhosin.org&quot;&gt;Suhosin&lt;/a&gt; will protect applications that wrongly put too much trust into these variables by URL-encoding them within the variables.&lt;/p&gt;&lt;p&gt;&lt;br /&gt; If you have more ideas for simple features that can protect many scripts at once don't hesitate to contact us.&lt;/p&gt;    </content:encoded>
    <pubDate>Fri, 30 Nov 2007 16:51:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/94-guid.html</guid>
    </item>
<item>
    <title>SektionEins @ DeepSec 2007</title>
    <link>http://blog.php-security.org/archives/93-SektionEins-DeepSec-2007.html</link>
<category>Security</category>    <comments>http://blog.php-security.org/archives/93-SektionEins-DeepSec-2007.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=93</wfw:comment>
    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=93</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
The &lt;a href=&quot;http://www.deepsec.net/&quot;&gt;DeepSec 2007&lt;/a&gt; conference in vienna, austria will start tommorow with 2 days of workshops followed by 2 full days of very interesting talks about different security topics. Together with my co-worker &lt;a href=&quot;http://blog.fukami.io/&quot;&gt;fukami&lt;/a&gt; I will attend the conference on behalf of &lt;a href=&quot;http://www.sektioneins.de/&quot;&gt;SektionEins&lt;/a&gt;.&lt;p&gt;&lt;br /&gt;The speakerlist of DeepSec is very impressive, it includes Halvar Flake, Dave Aitel, David Litchfield, Martin Johns, Jeff Moss, Alexander Kornbrust and my co-worker fukami who will speak about &lt;a href=&quot;https://deepsec.net/speakers/#flash-security-basics&quot;&gt;Adobe Flash Security&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;    </content:encoded>
    <pubDate>Mon, 19 Nov 2007 08:19:14 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/93-guid.html</guid>
    </item>
<item>
    <title>CORE GRASP - PHP Tainted Mode</title>
    <link>http://blog.php-security.org/archives/92-CORE-GRASP-PHP-Tainted-Mode.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/92-CORE-GRASP-PHP-Tainted-Mode.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=92</wfw:comment>
    <slash:comments>8</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=92</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;a href=&quot;http://www.coresecurity.com&quot;&gt;Core Security Technologies&lt;/a&gt; today announced the release of &lt;a href=&quot;http://grasp.coresecurity.com/index.php?m=dld&quot;&gt;CORE GRASP&lt;/a&gt;, which is a patch against the PHP 5.2.3 code tree that adds a tainted mode to PHP to protect the &lt;a href=&quot;http://www.php.net/mysql_query&quot;&gt;mysql_query()&lt;/a&gt; function. Their implementation adds a tainted or not flag for every byte so that it is possible on invocation of mysql_query() to determine any kind of injection.&lt;p&gt;&lt;br /&gt;To add such a tainted mode to PHP has been discussed several times in the past. It was rejected for several reasons like the obvious huge speed impact and the danger of false positives and a false sense of security. And indeed the way CORE GRASP is implemented it looks like a huge memory and speed overhead that should be tested. In addition to that their query parser will for example wrongly detect quotes escaped by doubling as injection attack.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Aside from this there are several other possible problems in the code like a remote one byte stack overflow (that seems harmless due to memory alignment), wrong handling of the _SERVER superglobal in case of JIT and it also seems that control characters like linebreaks can be injected into the logfiles. Further analysis and a deeper look into the code is needed.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;However it has to be taken into account that this is the very first public version of CORE GRASP, so maybe all these problems are gone soon and support for further database engines is added. &lt;/p&gt;    </content:encoded>
    <pubDate>Wed, 22 Aug 2007 21:37:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/92-guid.html</guid>
    </item>
<item>
    <title>MOPB Exploits taken down</title>
    <link>http://blog.php-security.org/archives/91-MOPB-Exploits-taken-down.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/91-MOPB-Exploits-taken-down.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=91</wfw:comment>
    <slash:comments>58</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=91</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;p&gt;Unfortunately I had to take down all the proof of concept exploits that were developed during the &lt;a href=&quot;http://www.php-security.org&quot;&gt;Month of PHP Bugs&lt;/a&gt;. The reason for this is a new law in germany that is official since today. This new law renders the creation and distribution of software illegal that could be used by someone to break into a computer system or could be used to prepare a break in. This includes port scanners like nmap, security scanners like nessus and of course proof of concept exploits.&lt;/p&gt;    </content:encoded>
    <pubDate>Fri, 10 Aug 2007 16:28:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/91-guid.html</guid>
    </item>
<item>
    <title>More CSRF Redirectors</title>
    <link>http://blog.php-security.org/archives/90-More-CSRF-Redirectors.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/90-More-CSRF-Redirectors.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=90</wfw:comment>
    <slash:comments>11</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=90</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;p&gt;Today I learned about another CSRF redirector by another group of people in web application security called &lt;a href=&quot;http://www.gnucitizen.org/&quot;&gt;GNUCITIZEN&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Similar to the &lt;a href=&quot;http://blog.php-security.org/archives/89-About-the-CSRF-Redirector.html&quot;&gt;previous CSRF redirector&lt;/a&gt; it contains the same XSS vulnerability through the javascript URI scheme.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.gnucitizen.org/util/csrf?_method=GET&amp;_url=javascript:alert%28/WE_ARE_DOOMED_:-\\/%29;&quot;&gt;http://www.gnucitizen.org/util/csrf?..._url=javascript:alert(/.../);&lt;/a&gt;&lt;/p&gt;&lt;p /&gt;&lt;p&gt;&lt;br /&gt;
&lt;b&gt;Update:&lt;/b&gt; The bug is fixed for now...&lt;br /&gt;
&lt;/p&gt;    </content:encoded>
    <pubDate>Sun, 29 Jul 2007 14:15:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/90-guid.html</guid>
    </item>
<item>
    <title>About the CSRF Redirector</title>
    <link>http://blog.php-security.org/archives/89-About-the-CSRF-Redirector.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/89-About-the-CSRF-Redirector.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=89</wfw:comment>
    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=89</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
You might have seen &lt;a href=&quot;http://shiflett.org/blog/2007/jul/csrf-redirector&quot;&gt;this post&lt;/a&gt; in Chris blog about a CSRF redirector he did. This is basically nothing more than a little script that turns a GET request into a hidden formular that is then posted via JavaScript. There have always been security issues with redirector scripts, and if you provide one open to anyone, you should care about what kind of redirects you actually allow.&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;Two major risks happen to exists with chris example:&lt;br /&gt;
&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Malicious people could misuse them as bouncers to attack other sites&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Not every URL is a web page. Some can load plugins, display information and&lt;br /&gt;
some can execute JavaScript.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Here is an example URL:&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;a href=&quot;http://shiflett.org/csrf.php?csrf=+++%6aavascript:alert(/I_AM_A_SECURITY_EXPERT/)&quot;&gt;http://shiflett.org/csrf.php?csrf=javascript:alert(/I_AM_A_SECURITY_EXPERT/)&lt;/a&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;In Internet Explorer (and Safari) this will give you access to the domain (cookies, etc...). In Firefox you can still do other funny things.&lt;br /&gt;
&lt;br /&gt;
So if you implement (javascript) redirector scripts, make sure you do a proper&lt;br /&gt;
whitelisting of the user delivered urls.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;UPDATE:&lt;/b&gt; The above example for a simple XSS does no longer work. However there are still other XSS vulnerabilities like variable-width problems in the CSRF redirector and it is still an open bouncer for malicious persons.&lt;/p&gt;    </content:encoded>
    <pubDate>Wed, 18 Jul 2007 09:30:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/89-guid.html</guid>
    </item>
<item>
    <title>BlogSecurity Interview</title>
    <link>http://blog.php-security.org/archives/88-BlogSecurity-Interview.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/88-BlogSecurity-Interview.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=88</wfw:comment>
    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=88</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
Two days ago I was interviewed by the people of &lt;a href=&quot;http://www.blogsecurity.net&quot;&gt;BlogSecurity&lt;/a&gt; about my thoughts about WordPress, their vulnerabilities and how they deal with them. The &lt;a href=&quot;http://blogsecurity.net/wordpress/interview-280607/&quot;&gt;interview&lt;/a&gt; is meanwhile online.&lt;p /&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;    </content:encoded>
    <pubDate>Fri, 29 Jun 2007 18:50:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/88-guid.html</guid>
    </item>
<item>
    <title>What site do you want to break today?</title>
    <link>http://blog.php-security.org/archives/87-What-site-do-you-want-to-break-today.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/87-What-site-do-you-want-to-break-today.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=87</wfw:comment>
    <slash:comments>15</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=87</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
I just came back home and saw a &lt;a href=&quot;http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.35&amp;r2=1.417.2.8.2.36&quot;&gt;very recent commit&lt;/a&gt; to PHP's session management. It is another attempt to fix the &lt;a href=&quot;http://www.php-security.org/MOPB/PMOPB-46-2007.html&quot;&gt;session cookie attribute injection&lt;/a&gt; that the PHP developers already tried to fix in PHP 5.2.3 without giving any credits. They still refuse to implement the correct fix that consists of just encoding the session id before sending it back through the cookie.&lt;p&gt;&lt;br /&gt;The amusing thing this time is that their new fix that consists of blacklisting a bunch of legal characters from the session id, will most probably result in hundreds or thousands of broken sites. What is even more funny is that the commit comes from a Zend employee that blacklists the ':' character from being used in the session id. The &lt;a href=&quot;http://www.hardened-php.net/advisory_052006.128.html&quot;&gt;last time I audited&lt;/a&gt; the Zend Platform session clustering module it used exactly this character within session ids. This basically means that the session clustering of the Zend Platform will no longer work with the next PHP versions.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;And as a final comment to the commiter: You are blacklisting a bunch of legal characters. Whatever RFC you used for choosing the characters for your blacklist was the wrong one. PHP implements the Netscape Cookie standard that is defined &lt;a href=&quot;http://wp.netscape.com/newsref/std/cookie_spec.html&quot;&gt;here&lt;/a&gt;. That document described very clearly that all characters are allowed except whitespace and semicolon. So nearly all the characters in your list are legal. Thank you for breaking lots of sites.&lt;/p&gt;&lt;br /&gt;
    </content:encoded>
    <pubDate>Fri, 15 Jun 2007 23:40:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/87-guid.html</guid>
    </item>
<item>
    <title>Chunk_split() Overflow not fixed at all...</title>
    <link>http://blog.php-security.org/archives/86-Chunk_split-Overflow-not-fixed-at-all....html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/86-Chunk_split-Overflow-not-fixed-at-all....html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=86</wfw:comment>
    <slash:comments>12</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=86</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;p&gt;If you are one of the guys that read the PHP CVS commits you usually know about the security bugs months before the rest of the community and this is no news for you. During the last 24h the following fix was merged into the PHP CVS.&lt;a href=&quot;http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.58&amp;r2=1.445.2.14.2.59&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.58&amp;r2=1.445.2.14.2.59&quot;&gt;Corrected fix for CVE-2007-2872&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;This fixes the chunk_split() overflow (found by SEC-CONSULT) that was according to the PHP 5.2.3 release notes already fixed. The &lt;a href=&quot;http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.57&amp;r2=1.445.2.14.2.58&quot;&gt;original fix&lt;/a&gt; was however not only broken but complete nonsense. If you can read C you will see that the integer overflow was not fixed in PHP 5.2.3 but simply moved into a separate line and an additional bogus if clause was added.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;You can test this yourself with the following code:&lt;/p&gt;&lt;pre&gt;&amp;lt;?php&lt;br /&gt;   $a=str_repeat(&amp;quot;A&amp;quot;, 65537);&lt;br /&gt;   $b=1;&lt;br /&gt;   $c=str_repeat(&amp;quot;A&amp;quot;, 65537);&lt;br /&gt;   chunk_split($a,$b,$c);&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;So my &lt;a href=&quot;http://blog.php-security.org/archives/84-PHP-5.2.3-released....html&quot;&gt;recent posting&lt;/a&gt; that was called &lt;a href=&quot;http://daylessday.org/archives/5-Fud-as-a-marketing-strategy.html&quot;&gt;marketing FUD&lt;/a&gt; is even more true.&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;br /&gt;PS: I wonder if SEC-CONSULT was the one that reported that the fix is no fix at all or if it was one of the linux distributors. The linux distributors and their regression tests are always a good way to check if bugs are fixed correctly.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;i&gt;PS2: What I failed to mention in the original blog entry is that the fix of the fix is still vulnerable to an overflow, because a float number is casted to an int for the allocation. In case of big int numbers this will result in not enough memory being allocated.&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;&lt;p /&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;    </content:encoded>
    <pubDate>Mon, 04 Jun 2007 19:07:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/86-guid.html</guid>
    </item>
<item>
    <title>Google for me and get Zend</title>
    <link>http://blog.php-security.org/archives/85-Google-for-me-and-get-Zend.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/85-Google-for-me-and-get-Zend.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=85</wfw:comment>
    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=85</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;p align=&quot;center&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;arial,helvetica,sans-serif&quot;&gt;Brought to you from one of the comments in my blog.&lt;/font&gt;&lt;/p&gt;&lt;p align=&quot;center&quot; /&gt;&lt;p align=&quot;center&quot; /&gt;&lt;p align=&quot;center&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://blog.php-security.org/sponsored.jpg&quot; /&gt;&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align=&quot;center&quot; /&gt;&lt;p align=&quot;center&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;arial,helvetica,sans-serif&quot;&gt;Google for &amp;quot;Stefan Esser&amp;quot; and get a sponsored link for Zend.&lt;/font&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;br /&gt;&lt;a href=&quot;http://www.google.com/search?hl=us&amp;q=%22Stefan+Esser%22&quot;&gt;http://www.google.com/search?q=%22Stefan+Esser%22&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; It seems for now their budget is gone. My name is free again.&lt;font size=&quot;2&quot; face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=us&amp;q=%22Stefan+Esser%22&quot;&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;    </content:encoded>
    <pubDate>Fri, 01 Jun 2007 14:21:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/85-guid.html</guid>
    </item>
<item>
    <title>PHP 5.2.3 released...</title>
    <link>http://blog.php-security.org/archives/84-PHP-5.2.3-released....html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/84-PHP-5.2.3-released....html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=84</wfw:comment>
    <slash:comments>27</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
&lt;p&gt;PHP 5.2.3 was released with several security fixes.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Again not all security fixes are mentioned in the release announcement.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Again security bugs known to the developers were not correctly fixed.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;More info &lt;a href=&quot;http://www.php-security.org/MOPB/PMOPB-46-2007.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;PS: Why does PHP.net always release security fixes just before the weekend?&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;UPDATE:&lt;/b&gt; Antony Dogval from Zend meanwhile wrote a &lt;a href=&quot;http://daylessday.org/archives/5-Fud-as-a-marketing-strategy.html&quot;&gt;blog entry&lt;/a&gt; where he comments on this blog entry. He claims that I did not tell the PHP developers how to fix the issue. I love it how members of the PHP development team that do not receive the mails to security@php.net try to convince the world that I never sent those mails. I wrote atleast 2 times in the conversation about the described bug that the problem is because the session id is not encoded. I am not the php.net babysitter. I repeated myself and got ignored, I am not begging PHP.net to listen to reason. &lt;/p&gt;&lt;br /&gt;
    </content:encoded>
    <pubDate>Fri, 01 Jun 2007 06:27:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/84-guid.html</guid>
    </item>
<item>
    <title>PHP 4 - Reference Counter Overflow Fix</title>
    <link>http://blog.php-security.org/archives/83-PHP-4-Reference-Counter-Overflow-Fix.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/83-PHP-4-Reference-Counter-Overflow-Fix.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=83</wfw:comment>
    <slash:comments>11</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=83</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
Because the PHP developers do not want to fix the &lt;a href=&quot;http://www.php-security.org/MOPB/MOPB-01-2007.html&quot;&gt;PHP 4 Reference Counter Overflow Vulnerability&lt;/a&gt; that was disclosed during &lt;a href=&quot;http://www.php-security.org&quot;&gt;the Month of PHP Bugs&lt;/a&gt; the &lt;a href=&quot;http://www.hardened-php.net&quot;&gt;Hardened-PHP Project&lt;/a&gt; as usual had to step in to protect the users of PHP.&lt;p&gt;&lt;br /&gt;I created a &lt;a href=&quot;http://www.hardened-php.net/patches/php-4.4.7-refcount-overflow-fix.patch.gz&quot;&gt;patch for the refcount overflow problem&lt;/a&gt; that took about 30 minutes to develop and that fixes the problem without breaking binary compatibility. Something that is according to claims of Zend Engine developer and Zend employee Stanislav Malyshev not possible at the moment. You can apply it directly or wait until it was ripped and merged into the default PHP CVS after it was relabled as the work of the PHP developers.&lt;/p&gt;&lt;p /&gt;&lt;br /&gt;
    </content:encoded>
    <pubDate>Sun, 20 May 2007 15:06:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/83-guid.html</guid>
    </item>
<item>
    <title>Suhosin 0.9.20 and crypt() Thread Safety Vulnerability</title>
    <link>http://blog.php-security.org/archives/82-Suhosin-0.9.20-and-crypt-Thread-Safety-Vulnerability.html</link>
<category>PHP</category><category>Security</category>    <comments>http://blog.php-security.org/archives/82-Suhosin-0.9.20-and-crypt-Thread-Safety-Vulnerability.html#comments</comments>
    <wfw:comment>http://blog.php-security.org/wfwcomment.php?cid=82</wfw:comment>
    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://blog.php-security.org/rss.php?version=2.0&amp;type=comments&amp;cid=82</wfw:commentRss>

    <author>blog-admin@nopiracy.de (Stefan Esser)</author>
    <content:encoded>
&lt;br /&gt;
I just released &lt;a href=&quot;http://www.suhosin.org&quot;&gt;Suhosin 0.9.20&lt;/a&gt; that adds a few &lt;a href=&quot;http://www.hardened-php.net/suhosin/changelog.html&quot;&gt;new features&lt;/a&gt; and bugfixes. The most important addition is that a mutex is placed around the call to the system's crypt() function to ensure thread safety. This mutex is necessary to close a bunch of possible attacks on the libc crypt() function on multi threaded systems.&lt;p&gt;&lt;br /&gt;Because the libc crypt() function (and also the PHP port for windows) is not thread safe there exists a race condition that can be exploited on multi threaded systems. When for example two threads are trying to validate passwords through crypt() at the same time they are using the same internal memory area which can result in both crypt() actions returning invalid results or the result of the one operation can overwrite the result of the other. It is obvious that in this case a thread using a wrong password will return the correct crypted password if during the same time another thread calls crypt() on the correct password. In this case the application will usually login the user that used the wrong password. &lt;i&gt;(However the thread race is hard to win from remote)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Because Suhosin changes the default crypt() method to the blowfish implementation it comes with, which is thread safe by default Suhosin users were safe from this vulnerability before this update, unless they provided their own salt when they called crypt().&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; In PHP 5.2.1 the PHP developers silently closed that hole for UNIX systems that support crypt_r(). It is however very likely that they did not realise the security implications, because they have no protection for systems that do not have crypt_r(), they did not merge it to PHP 4 and they also did not fix the windows implementation.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;    </content:encoded>
    <pubDate>Sat, 19 May 2007 20:35:01 +0000</pubDate>
    <guid isPermaLink="false">http://blog.php-security.org/archives/82-guid.html</guid>
    </item>
</channel>
</rss>
