Brad Spengler Profile picture
Aug 20 37 tweets 11 min read Read on X
You too can crash today's 6.12.43 LTS kernel thanks to a stable maintainer's AI slop. All you need is CAP_SYS_RESOURCE, modern systemd, and this:

40 b7 40 c1 e7 18 83 ef 08 57 57 31 ff 40 b7 07 31 c0 b0 a0 48 89 e6 0f 05 5e ff ce 31 ff b0 21 0f 05

Look at all this extra space!
How do I know it's plagiarized AI slop that evaded upstream reviewers? The well-written commit message is riddled with basic errors that nobody who actually produced the code through testing it would make: first, it does a setrlimit of RLIMIT_NOFILE that's higher than...
the nr_open it just set. That will fail immediately regardless of privilege level in setrlimit at: git.kernel.org/pub/scm/linux/…
Next, it tries to dup2 with a fd *higher* than the resource limit it just set, that too will fail immediately early in dup2 regardless of privilege level without calling alloc_fdtable or doing any allocations here: git.kernel.org/pub/scm/linux/…
It really looks like an LLM was just pointed at: and it failed to understand the system limitations and the relationship between the different values, but spit something out that "looked" similar, complete with the dup'd fd being offset by 64 from nr_opengit.kernel.org/pub/scm/linux/…
But the important point is that this was supposedly code to reproduce a specific bug, a real one I had already tweeted about in January. But the bogus test tests nothing at all, it will simply fail 100% of the time without ever testing what it claimed. Worse than that...
because the "developer" didn't go through a real process producing the code and commit, slapping a stable@ on it, they never looked at what would happen to that commit on older kernels. It patched a function (alloc_fdtable()) that was changed in 6.13 to return ERR_PTR values...
On earlier kernels, alloc_fdtable() returns NULL on all errors, and callers will dereference any non-NULL return value. So when it got cherry-picked clean despite the obvious difference visible in diff context, you end up with a vuln in a core syscall.
There's no point in reporting this stuff because the vulnerability is simple:

stable maintainers using AI who have no idea what they're doing and are using it as a substitute for the work everyone else assumes they've performed

It'll keep happening until that bug's fixed.
Including this for transparency: lwn.net/Articles/10425… But anyone can also look up that the author's kernel contributions prior to this year date to 2022, with a number from this year admitted to be generated by AI, undisclosed in the commits themselves: lwn.net/Articles/10265…
Can look at the commit message itself and ask if a perfectly-formatted/indented testcase and bulleted report which is entirely non-functional on multiple levels is what normal humans produce without any AI involvement (which a 'not used for the patch' doesn't necessarily deny)
Let's look at all of his commits from this year. First was this one: He didn't admit this one was authored by AI as far as I've seen, but it's identical in purpose/verbiage as this one authored 3 days later and (via the earlier link) admitted AI-authoredgit.kernel.org/pub/scm/linux/…
The one after that was which the author later admitted was AI-generated via the same link above (i.e. plagiarized). You can view the dismissive tone toward the maintainer and others who felt the submission should have been labeled(as done for static tools)git.kernel.org/pub/scm/linux/…
here: lwn.net/Articles/10275… Commit after that was a fixup, as the AI didn't add SPDX/copyright lines: git.kernel.org/pub/scm/linux/… (which it's not even clear he can legally do, but whatever, he doesn't seem to care about this).
And then the very next commit after that is the one at question here: So believe what you want, I don't care 🤷‍♂️git.kernel.org/pub/scm/linux/…
Can try to downplay it by just repeating what I said in the original post as if it's somehow a correction of what I wrote, nevermind that he's on the CNA and they issue CVEs for exactly issues like this day and night. But in this case it got silently fixed by backporting:
with no mention of the vuln that was introduced, and no CVE either, shocker.git.kernel.org/pub/scm/linux/…
Similar to how when he blindly accepted AI-AUTOSEL output to backport an x86 mitigation patch that didn't belong at all in 5 LTS kernels, turning the userland Spectre v2 mitigation into a no-op for a month, no CVE was issued there either.
I've cited all this before (x.com/spendergrsec/s…), but to show it all again: the mention of AI AUTOSEL regarding the batch that included the commit that didn't belong: lwn.net/Articles/10202… The AUTOSEL recommendation: lore.kernel.org/all/2025050522…
The fix commit, required to be applied to the 5.4, 5.10, 5.15, 6.1, and 6.6 LTS kernels: git.kernel.org/pub/scm/linux/…
Anyway, clearly his AI is so good that he doesn't need any more of his slop fixed up by me in LTS kernels. Happy to oblige!
FTR, our business is not affected by AI succeeding or failing. I don't have any strong convictions either way, but what I do know is slop is slop, and I (and others) don't trust this person's judgment in using AI critically, based on the above (& more) info that I've documented.
Some other recent examples of why I don't trust his judgment or ability to review/test what he publishes:
Here he proposed to backport a whole network scheduler just to get one random fix (out of a dozen or so others) applied to it (have to introduce the bug to fix it, right?): git.kernel.org/pub/scm/linux/… lore.kernel.org/stable/871prjv…
Here he backported a patch to fix support for something that doesn't exist at all in the kernel he backported to:
Above quote tweet shows the earlier time the same thing was done a few months earlier regarding the same feature by the same person.
May of last year, his "backport" of "NFSD: Fix
nfsd4_encode_fattr4() crasher", which was a simple fix for a uninitialized kfree, caused him to backport as a supposed "dependency" for an entirely unrelated file per-netns NFS statistics
which crashed the kernel on NFS use:
Others have noted he ignores feedback: In most of the cases I've documented, he's nowhere to be found on the mailing lists related to the problems created by his sloppiness, and so no real learning happens.social.kernel.org/notice/Amj9cj6…
@__picaro8 @arivero @jocadbz Just to show the distinction for people that aren't aware:
git.kernel.org/pub/scm/linux/… is the mainline Linux tree, all commits in there have to go through Linus in some form
Stable/LTS kernel versions are in a separate repo, managed by the stable maintainers: git.kernel.org/pub/scm/linux/…
@__picaro8 @arivero @jocadbz Can click the combo box at the top right to view other present/past stable/LTS versions (each is in its own branch).

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Brad Spengler

Brad Spengler Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @spendergrsec

Jun 26
Huh, I didn't realize that the vibe-coded vulns inserted into 5 LTS kernels that still aren't fixed 22 days later haven't been fixed because the person who inserted them is busy telling everyone at a conference how great the AI he used to insert the vulns (that he didn't find) is Image
According to the LWN article today on the talk, they're also apparently using AI to plagiarize: Sasha claims he's the author of this commit: that he admits was entirely written by an LLM, not copyrightable code, false authorship...git.kernel.org/pub/scm/linux/…
possibility of violating who knows what copyright. Is this what people have to stoop to to "scale"?
Read 10 tweets
Jun 9
Vibe coding has no place in Linux kernel maintenance. The vulnerability inserted into 5 LTS kernels at once apparently without any review is yet another instance of AUTOSEL fallout, here with the "new" LLM-powered version. Sources: lwn.net/Articles/10202… lore.kernel.org/all/2025050522…
I think good questions to ask when someone reports a vulnerability or regression caused by an incorrect backport are: can you articulate a reason why you backported this change? what review did you perform on the change to ensure it's appropriate for the kernel it's applied to?
I've reported a number of issues, and it feels like I'm just subsidizing broken processes because these two questions never get asked, so the root of the problem is never solved. It's boggling to me even that the person involved never even chimes in to suggest a revert...
Read 13 tweets
Dec 17, 2022
"one kernel developer mentioned to me that this was definitely not the intent and might have been a regression" I'd be very shocked if that developer had anything to do with the code, because this behavior was basically documented even when the PCID-enabled variant was written
Not in any user-visible way of course, but even the PCID variant was only described as "a little more secure" wrt global pages, and the mapping of entry text and it being part of the kernel image was evident from the code all along.
In other words, you basically only ever believed KPTI was useful against KASLR if you believed Linus' pre-Meltdown words or got your regurgitated news from LWN
Read 8 tweets
Sep 23, 2020
This is the right response: openwall.com/lists/kernel-h… For the same reason that NX is necessary even if it doesn't stop ROP, or that CFI is necessary even if it doesn't stop data-only attacks. They each serve their own purpose (and you'd be hard-pressed to have useful CFI w/o NX)
When the pieces are defined in advance and there's a clear path to achieving them that doesn't involve unrealistic assumptions (as is the case here) there should be no debate. At this point it's just useless posturing on the part of the upstream dev.
Same hazing I mentioned in my talk, to where most people would learn to be a brown-noser if this kind of "collaboration" was required for their career, or would just do whatever silly watered-down version upstream wanted if they just needed something for a resume...
Read 10 tweets
Sep 23, 2020
Some more history: marc.info/?l=openbsd-mis… "unless the application requests it, of course..." cf. openwall.com/lists/kernel-h… "W^X is not supposed to protect you from attackers that can already do
system calls."
then many years later ("A W^X refinement"): marc.info/?l=openbsd-tec… "I wish to block direct system calls from those areas"
From the NetBSD end, they've been using a port of PAX_MPROTECT for some time: netbsd.org/gallery/presen… Image
Read 4 tweets
Aug 26, 2020
Bruce Perens gives a talk where he mentions in passing the "Red Hat loophole" -- archive.is/laW2p Why doesn't he call Red Hat a GPL violator in a blog post published worldwide on news sites? The "information" he talks about (for the kernel) are split-out GPL'd patches
No copyright holder contacted us with concerns prior to Bruce's post, and none have contacted us after. This is likely because everyone (including Bruce himself) knows it's perfectly legal (otherwise Bruce wouldn't be calling it a "loophole": i.e. something legal he doesn't like)
The archived link above demonstrates Bruce knows we have the same subscription policies Red Hat has had in place for two decades. That he hasn't either 1) published a similar blog about Red Hat that tries to destroy their business or 2) published a public apology as widespread..
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(