Top
Best
New

Posted by ejohnso49 9 hours ago

Today's PHP security release, and how we're strengthening security(thephp.foundation)
Related ongoing thread: PHP 8.2.35 - https://news.ycombinator.com/item?id=50180873

(links to more at https://news.ycombinator.com/item?id=50184935)

651 points | 323 commentspage 5
snootypoot 8 hours ago|
[dead]
mschuster91 8 hours ago||
[dead]
charcircuit 8 hours ago||
>Chainguard unilaterally broke the embargo and published built images containing the fix.

>This disregarded weeks of work by many parties toward a coordinated disclosure.

Good. Coordinated disclosure meant that people couldn't protect themselves. That's not a good thing. It meant sites were forced to shut down instead of simply updating.

BHSPitMonkey 7 hours ago||
No... Uncoordinated disclosure meant that attackers were suddenly armed with detailed information about an already-hyped severe vuln hours before the majority of downstream consumers had the means to patch their systems.

Maybe your calculus could hold if Chainguard's registry were the primary distribution mechanism for PHP in use worldwide (such that the benefit of an updated image would at least be widespread compared to the sitting ducks relying on the other repositories), but it isn't.

InsidiousWombat 3 hours ago|||
I will nitpick on that, if it was just released as a patch, there wouldn't be a hype to begin with, just point update to apply.

I'm just gonna assume patch was ready for a while and the wait time was just letting big players to update their own stuff before it is available for the public, and at that point it is just making the rest of the internet second class citizens not "worthy" enough to get the update quicker.

charcircuit 4 hours ago|||
If the sites are taking no action they will be vulnerable no matter when the patch is released. For the people who do take action before chainguard's release the safe option was to just turn off your server (and let any big competitor site stay up and take your traffic since they got the patch ahead of time). People taking this option will be offline until a fix is available for them to use. They are not in danger of being hacked.

Trying to say that uncordinated disclosure is bad because people might get hacked yesterday instead of today just is not a convincing argument to me. I prefer the solution that results in the minimum amount of downtime for sites and sites provide value to society.

S0y 8 hours ago||
You need to pay to get access to chainguard images.
blantonl 8 hours ago|||
That is incredibly damaging to the trust that coordinated vulnerability disclosure depends upon. The obvious consequence is that Chainguard should never again receive embargoed fixes in advance. You don’t get invited back into the room after demonstrating that you can’t be trusted with the information.

They didn’t get to unilaterally decide that the embargo was inconvenient and publish early.

charcircuit 4 hours ago||
Why do you place a higher priority on maintaining coordinated vulnerability disclosure than of the safety of actual users of the software being protected?
lrae 8 hours ago||||
They made them available for everyone and free in this case.

https://news.ycombinator.com/item?id=50176735

tflinton 8 hours ago||||
No, you don't, you just don't get older patched versions unless you pay.
john_strinlai 8 hours ago|||
not the ones related to this
miohtama 7 hours ago||
The old joke:

The guide to PHP security:

Use something else.

The end.

redox99 7 hours ago|
As long as PHP is written in C, it will be insecure.

It sounds cliche but yes, they should rewrite PHP in rust or other memory safe language.

TheJoeMan 7 hours ago||
As long as programmers trust 3rd-party-provided content-length input, it will be insecure. At this point, I'm not sure why we even use content-length anymore since you're going to need to size your buffers based on the actual content.
InsidiousWombat 3 hours ago||
Because when file finishes you want to verify whether the size matches.

And for non-malicious content, you can drop file above the upload max limit before user wastes time sending the file.

berkes 5 hours ago|||
There should be more interpreters or runtimes. Regardless of the language they are written in. Indeed a rustPHP, maybe a JPHP, cPHP, etc etc. There is zend, but AFAIK that's still using the "official" PHP under the hood. And there is or was hiphop. Not sure how that is going, though.

Because now a vulnerability in PHP affects practically 100% of the users. But with more diversity, it would affect only a part. And if one runtime proves insecure more often than another one, organizations have a choice to move to an interpreter that better fits their security needs.

pluc 4 hours ago|||
It's pretty popular in Go: https://frankenphp.dev/
cute_boi 7 hours ago|||
And, i don't understand why we are still using PHP. Agents can use Rust or go directly and we get benefit of performance...
muspimerol 7 hours ago|||
Because like 30% of the websites in the world are on WordPress, and countless others in custom PHP? Not exactly a trivial task.
mbac32768 4 hours ago||
Claude please rewrite my entire WordPress site as an OCaml Mirage Unikernel that runs directly on bare metal, no Linux.

I bet that takes a week at most.

system2 4 hours ago||
While at it, create a custom firmware for the BIOS to utilize the CPU more.
Cthulhu_ 3 hours ago||
In fact, design an FPGA that runs my wordpress blog about my stamp collection in pure hardware. Make no mistakes.
vaylian 7 hours ago||||
and the increased costs of maintenance of a code base that humans will be reluctant to read.
sevenzero 7 hours ago|||
Because its way easier to verify LLM generated code for Laravel over some Rust project. Or do you just vibe it and dont look at code anymore?
rectang 5 hours ago||
I'm generally bullish on migrating C projects to Rust, but that will only reduce a particular class of vulnerabilities. There will still be other vulnerabilities which remain discoverable by LLMs, and for those, the problem of accelerated exploit creation will remain.

I'm really not sure how you mitigate this issue, other than serving static HTML and reducing the attack surface to cut out dependencies like PHP.