that PHP fix is 13k lines
5k apparently of non-tests
that's all human written, right? I wouldn't want to speak out of turn about sprawling quick fix diffs
@davidgerard Even if this isn't that, at *some* point we're going to see a quick "everyone panic! Keystone tool XYZ is compromised!" 13kloc fix that fixes … something … then deliberately adds three more well-obfuscated backdoors.
@cstross if we haven't seen it yet we haven't noticed it
vibe code is a playground for the bad guys
@davidgerard We've spent more than 75 years trying to keep code and data separate and vibe coding just drunk-drove a bulldozer through a lifetime of hard-learned lessons about best practices.
@corbet i just spent my entire day and missed doing today's post/episode because of it, so i'm not enamoured of PHP
i expect the PHP team is not having the greatest day either
@cstross @davidgerard Everyone knows the solution to in-band signaling is more in-band signaling with a lid of extra begging and pleading on top.
@stoori i expect they're not having the greatest day either
@davidgerard On an extremely cursory look at the patch diff, the code is of course awful because it's in C, but it looks like human-writen awful C. No obvious AI "tells" have jumped out at me. The tests even appear to test the fixes rather than just print "yeah, everything's just fine, ship it".
It looks like several people have in fact put in quite a heroic effort to fix this, for which they should get a commendation, but it's a shame that they have to waste their talents on this unmaintainable mudball.
@davidgerard It doesn't look LLM generated at first blush, but I'm no longer confident in my ability to tell to be honest. Either way, you could not possibly pay me enough to sign off on +11k -1k over 423 files with most of it being random branches and gotos...
@pndc @davidgerard What I was told is that the fix process for this vuln (actually pair of vulns) was a process that lasted about a month and crossed multiple organizations
💾
@pndc @davidgerard oh I have plenty of obvious AI ones when I looked through earlier:
- changed test cases to something different for no reason. I talked about this earlier https://chitter.xyz/@JennyFluff/117479752875775371
- out of memory checks on each iteration of a loop instead of growing the thing first, checking it and then coping over the data
random function return type changes for no reason
- several function return types were changed from void to bool for no apparent reason.
- gates on the newly added return type changed function return true or SUCCESS depending on the file (when if you'd even do that return false at a failed gate!)
- sometimes they handle OOM errors with a goto, sometimes with returns. Sometimes goto statements jump to different labels instead of just oom, like oom_function_name
- sometimes they gate OOM error handling with some other condition that makes no sense
This is a dumpster fire of a patch.
💾
@pndc @davidgerard I don't understand enough of the structure but pretty sure you could implement a central OOM handler that doesn't return back to your previous code and just crashes.
Trying to add OOM checks on every function (and I cannot verify if they actually managed to do that in a reasonable time) is insane.
Not having the checks standardized is insane.
Just changing some code for no apparent reason in some files that seems to not have anything to do in one security patch commit is insane.
@davidgerard according to the blog post that went with this security release, they've been working on this patch for about 2 MONTHS, so this gigapatch may very well likely be human
@davidgerard after seeing some more detailed analysis on the patch I may need to retract my previous toot...
@techokami wondering which human put a little juicing in their code
@cstross @davidgerard Once the bubble pops/deflates a bit, LLMs may still be a long term good. Because while they absolutely *suck* at coding and anything where you have to be right all the time, they seem to be pretty good at red teaming and other things where you only have to be right once.
@neoluddite @cstross @davidgerard There's a world of difference in effectiveness between a pure random generator and a fuzzer. And a similar world of difference between a fuzzer and an LLM.
@davidgerard it’s not a quick fix, they spent months on it. The patch is massive because of massive tech debt in php’s byzantine design, there was no other way to do it.
The patch was co-signed by five humans and zero bots
A lot of the changes are in generated files. There are some massive .c files that look like they’re from some yacc-like tool. They use cpp #line directives so debuggers can map back to the original source locations. Something changed near the top of the original source file, so every line changes in the generated file. That’s a pretty huge part of the diff.
The rest is mostly sprinkling error-handling paths everywhere. I’m more concerned that the diff isn’t big enough, because an approach that requires errors to be checked in so many places requires probably requires them to be checked in at least one more place than you think (or Claude guesses).
The correct fix for the OOM issue is to kill the process, not to scatter error handling code everywhere. Anyone who wants to apply a more robust fix to their PHP package should add a line in PHP’s malloc wrapper that aborts on failure and just let daemon / systemd restart the FastCGI process.
I prefer to think of it as a nice shift away from the outsourcing and offshoring trend of previous decades. Now we can bring supply-chain attacks back in house.
@0xabad1dea oh well if they didn't say they used a bot, well
others wonder a bit, e.g.
https://chitter.xyz/@JennyFluff/117481147340068318
https://chitter.xyz/@JennyFluff/117479752875775371
https://chitter.xyz/@JennyFluff/117481175927488079
someone else listed particular comments that looked extremely bot to them, tho i can't find the post just now
@davidgerard I acknowledge those things sound like they could be LLM-generated but they also sound like exactly the criticisms people have had about how messily PHP is implemented for 20 years. No esteemed deed etc etc
@cstross @davidgerard Having used coding agents, I'll say that is not a hard rule... but I also wouldn't trust anything I couldn't personally review.
@JennyFluff @davidgerard Oh yeah, it's a dumpster fire alright, and one that's clearly the result of a mechanical process that didn't consider solving the wider problem. But that doesn't necessarily indicate AI. I've worked on projects with confirmed-human commits not unlike that. Sometimes people really do grep around and paste in boilerplate fixes, tweaking randomly as they go to make it compile.
There's no smoking gun, it could go either way, and I'm prepared to give them the benefit of the doubt. I'm sure we'll find out soon enough when the next batch of CVEs drop.
💾
@pndc @davidgerard I don't know, if I grep and replace around I end up with a lot of the same execution and some artifacts that look the same, maybe same broken.
You could argue this is done by 4 people doing different things but I don't know this because it was listed as one commit. I mean this *could* explain why it sometimes returns false/true, sometimes Success/Failure and sometimes goto oom in the code.
This *smells* like AI code was involved down the line.
If you leave all the technical details out, you still ended up with a solution that now is a lot harder to service than before because everything has function call specific OOM handling added, but it doesn't follow a consistent framework and there are some exceptions to the implementation that have zero comments added.
I specifically did not look at the tests they *added* to verify the code, only the ones they changed. And things are very weird.
@0xabad1dea @davidgerard Sorry if this horse is already dead, but one of the co-signers has since admitted that "a substantial amount of AI" was involved: https://github.com/php/php-src/commit/31c0ea7d7ff1d1fccb6492e52dab544011628065#commitcomment-206067056
@ne_ @0xabad1dea @davidgerard quoting like a creationist isn’t a good look, irrespective of your position on AI. The full quote is: “I'd also like to let you know that, while a substantial amount of AI has been used for analysis, identification of vulnerable code, patch verification, and even test generation, only a small fraction of the functional changes were AI-generated and all of it was thoroughly reviewed and tested.”
The real message: PHP continues to be be high risk due to tech debt.
@acdha@code4lib.social @ne_ @0xabad1dea
> "we used the slop machine extensively but there's very little slop in the output honest"
> look inside
> slop tells all through
nobody is obliged to assume good faith in bad faith actions, and we don't have to take them at their word when the diff already said otherwise
@davidgerard If you expect to find "slop tells" you're very likely to find them. @ne_ @0xabad1dea
@ne_ @0xabad1dea @davidgerard That isn’t really what they write though, is it? Taken slightly out of context.
@discoursology @ne_ @0xabad1dea we should definitely take the guys who just got busted at their word about their excuses, ok
why are you people like this
@davidgerard @discoursology @ne_
because, to be blunt, you have been starting to sound religious about the LLM problem, which I assume is the opposite of your original intentions.
I fully agree that the correct amount of LLM-generated code in critical infrastructure codebases is zero percent. But the first thing I said about the patch minutes after it dropped, without forming any opinions on it being LLM-generated or assisted, was that it was massive and touched everything, due to PHP's poor design that long predates LLMs, and that's a Serious Problem even if they're all LLM vegans, which apparently they are not. The LLM usage is honestly a footnote to the problem, just one more thing to unfuck after decades of debt.
I am, as an anti-LLM person, also genuinely concerned about people making a religion out of anti-LLM stances that is completely independent of any specific facts or problems. I started to get concerned when you and other posters began treating "nuance" like a cuss word. Do people misuse and weaponize the word "nuance"? Of course. But if you give up the idea of nuance, context and specifics and treat any attempt to engage with them as betrayal, your stance is now a religion, an in-group loyalty test. Nuance is a crucial tool for coming to the best conclusion, and abandoning it as "the enemy's word" is conceding ground.
When you take statements like "a small amount of the functional changes were AI-generated" and treat it as obviously a lie based purely on the assumption that the out-group are lying liars who lie, you're a religion. People who are all-in on LLMs are usually quite up front about it being 100% LLM-generated! If someone says "I'm not a vegan, I have chicken sometimes," it's pretty weird to assume they're lying and actually eat nothing but chicken. The guys who actually think all-meat diets are a good idea never shut up about it until they're in the hospital.
And most people in the world are "I'm not vegan, I eat chicken sometimes," about most contentious things, including LLMs. And the most ideologically loud vegans have persistently made the mistake of demanding total immediate ideological compliance rather than acknowledging that two people cutting their meat intake in half is just as valuable to the cause as one person going true vegan, which has made "vegans" a byword for "obnoxious cultists to be avoided and ignored" rather than "people willing to give something up to take a principled stand."
I don't use LLMs. I think other people should avoid using LLMs as much as possible. I have loudly been promoting the learning and maintenance of human skills as deeply valuable. And, as someone who was raised in a fundamentalist young-earth-creationist extreme religious environment and had an extremely traumatizing time climbing out of that hole into the light of reason, I refuse to let being anti-LLM become my religion rather than my principled stance.
@0xabad1dea @davidgerard @discoursology @ne_ I don’t see how the “obnoxiousness” of vegans bears on the moral truth of what they claim.
@kevin jesus christ, the reading comprehension crisis is real.
@0xabad1dea I understand your point perfectly well, I just think it’s bad. If someone who is vegan thinks eating meat is morally equivalent to murder, it seems pretty clear that they wouldn’t be particularly enthused about moderating on that opinion. I’m not a utilitarian, I don’t see any moral basis for a “harm reduction” model here or with LLMs
@kevin you see, the funny thing is... I'm not vegan. I eat chicken sometimes. I do not accept the premise that killing a chicken is completely identical to killing a human, and this is based on me considering it carefully and sincerely. And yet I still freely conceded by analogy that vegans are morally justified and an admirable ideal to be respected, moving the world in a better direction, because sure, killing so many chickens still sounds pretty bad even if it's not literally murder, and I'm open to exploring ways we can structurally fix the problem. But now I'm mainly thinking about how obnoxious some rando in my mentions is
@0xabad1dea don't bother. david is here to be angry, not to be honest or to advance any useful political cause
@0xabad1dea It's funny that I can't see the start of this thread because David Gerard blocked me when I tried to explain the actual facts of the situation of an earlier case of LLM code going into a core infrastructure project.
@0xabad1dea @crzwdjk lol me too
its pretty silly that u cant view posts of ppl that block u when u can just go use private browsinf
@stag @crzwdjk it's a speedbump to enforce social norms. It's *rude* to use private browsing to look at the posts of someone who specifically said they don't want to talk to you anymore, and making it so you specifically have to go out of your way to do so will make most people think twice and highlight the intentional rudeness of the rest.
@0xabad1dea i disagree. for one, it gives a false sense of security. for two, it fails a basic ux principle, in that the user should be in control of their software. and for three, i disagree that its rude. i dont mind people i dont like seeing my posts. after all, public is public. i rarely ever block, only mute for this reason.
@stag you're free to not mind! that does not change the fact that it is, in general, amongst the many peoples and tribes of the internet, widely considered rude and unwelcome behavior.
@0xabad1dea either way, regardless of it being rude though, it still is an artificial limitation. and you should be in control of your software
@stag I'm pretty sure it's a server thing, not a client thing, but either way there are ways for you to control this if it's very important to you
@0xabad1dea @deech After reading similiar condemnations of another project because a human written diff and PR, with extensive docs, had claude in the PR description I just mute the zealots.
Doing drive by PR reviews like they are some kind of manager leaning on the cubicle of a volounteer, or even a paid contributor, trying hold up a codebase they shared with the world for free... I really don't need to hear from the FOSS equivalent of Maoist and Trotskyist podcasters.
I share the same concerns about security and safety and code quality of the ecosystem I make use of daily, that I built my career on, that I cherish as one of the greatest examples of international collectivist collaboration and a direct manifestation of "from each according to their ability, to each according to their needs". But, performative lamentation sucks, especially when it demonizes and degrades the people who are sharing their work with you, and poisons that.
Like Andrew Kelley said, don't take the black pill.
@0xabad1dea @davidgerard@circumstances.run
"spent months on it"
"no other way"
....
there used to be a way, it was called: "suck it."
yes, that's crass. yes, it lacks empathy. no, we can't possibly do that without half of the world burning down. but what you say is even worse. you pretend and i hecking quote: "there was no other way" which is plain untrue.
perhaps you meant "in this timescale" then, yeah. maybe. who cares?
who is gonna fix the now newly introduced bullshit? you cannot fight tech debt with more tech debt.
anyway, i sincerely hope you have a splendid day
@janet_catcus I'm rather unclear what you're even proposing here. Just not patching it in any way, ever? Never maintaining PHP again? I mean okay sure that's technically an option, just like refusing to take life-saving medication because it has side effects is technically an option.
@0xabad1dea sorry i was not clear enough:
banning ai use would be one thing.
@janet_catcus then I think you misunderstood my post? I was saying that the patch is large because it is inherently necessarily large, regardless of who writes it or how, and the largeness of the patch is not, in and of itself, evidence that it was AI-generated
the final conclusion after days of discourse is that it is partially AI-generated, especially the tests. But my point at the time was "the fact that it's big is not evidence."
@0xabad1dea @davidgerard @discoursology @ne_ David Gerard is sufficiently like a fundie cultist that I'm no longer allowed to read his stuff because I dared to not be extreme enough.
@0xabad1dea
i disagree that it's #purity culture to have a baseline for acceptable behaviour.
the »i'm vegan but occasionally eat chicken« is really absurd. it's like »i'm antiracist and only join the occasional nazi march,« or »i'm feminist and only do the occasional drug rape.«
eating #plantbased is just the neutral #centrist position: not actively killing, but also not doing anything to shut down #slaughterhouses. #veganism means advocating for animal liberation.
it's not purity culture to call out obvious and easily avoidable hypocrisy.
@pelle .... sure, that'd be hypocritical if I ever said that, which I absolutely did not. Please actually read posts before replying to them, it will save a lot of trouble
@0xabad1dea @gsuberland @davidgerard @discoursology @ne_ Thank you for this post. I use LLMs a lot because, as much as I'd love to make the undocumented sp-404mkii accessible my self, this would take me years and quite frankly this has been a massive boon for blind people in general. Talented people who know what their doing are modding video games left and right, to the point that you can comfortably have 300 Steam games in your library that even 2 years ago were never accessible. So while I understand why people generally are anti LLM because I hate the licence implications, the controll that the corporations have over the tech, and the many, many more valid concerns there are with this tech, I really wish we could all come together and just have a respectfull discussion, and agree to disagree. But I find a lot of people who use social media just aren't able to be respectful towards each other. You telling me shut up clanker with a middle finger emoji is definitely not going to change my mind lol
But this was about critiqueing someone bigger than you, not you specifically. If I attack Microsoft, how are you attacked? @Mudb0y @0xabad1dea @gsuberland @davidgerard @discoursology @ne_