cd /news/artificial-intelligence/squashfs-fix-a-lot-of-ai-issues-and-… · home › topics › artificial-intelligence › article
[ARTICLE · art-179367] src=lkml.iu.edu ↗ pub= topic=artificial-intelligence verified=true sentiment=↓ negative

Squashfs: Fix a lot of AI issues and AI style issues

Squashfs maintainer Phillip Lougher pushed back on AI-generated code review findings against his 23-patch series fixing AI-related issues in the Linux filesystem driver, arguing on the kernel mailing list that "AI amplifies problems because it lacks context and insight." Andrew Morton reported that Claude Fable flagged patch 08/23 for breaking squashfs_lookup() when its pr_debug is enabled — a page fault at ffffffffffffffc8 under CONFIG_DYNAMIC_DEBUG=y — and queued a fix, while disputing patches 10/23 and 15/23 for newly rejecting images with 8 unused bytes of padding and compressed blocks whose size equals the block size. Lougher said the padding rejection is correct by design since 2002 to prevent hidden malicious metadata, and noted the checks were added because another AI tool, Sashiko, complained they were missing.

recommendation

Verify AI reviewer findings against the code before acting: the flagged TRACE bug in squashfs_lookup() was real, but the padding and block-size complaints contradicted the format's design.

more in playbook: Verifying model output
read5 min views1 publishedDec 1, 2026

From: Phillip Lougher

**Date:**  Mon Nov 23 2026 - 04:43:37 EST

On Sun, 22 Nov 2026 23:54:53 -0800

Andrew Morton akpm@xxxxxxxxxxxxxxxxxxxx wrote:

On Mon, 23 Nov 2026 03:42:41 +0000 Phillip Lougher phillip@xxxxxxxxxxxxxxx wrote:

> This large patch-set is inspired by the recent spate of AI generated

> code reports.

Just to be annoying, I fed this into Claude Fable. It said a bunch of

stuff which looks very optional but the 08/23 blooper is worth fixing,

so I queued a -fix.

God forbid,I would never say you're annoying. But the AI assisted ability

to find fault in everything is exhausting.

AI amplifies problems because it lacks context and insight. Please don't

say you you've got into the belief everything AI says is correct, because

it can be contractory depending on the depth of the anaysis, which means

you will go into endless impossible cycles.

Some of the following is exactly that:

Unlike chatgpt, Fable is able to build kernels and run them in VMs all

inside its sandbox. Pretty cool stuff.

[08/23] breaks squashfs_lookup() when its pr_debug is enabled:

*struct inode inode = NULL;

...

TRACE("Entered squashfs_lookup [%llx:%x]\n",

squashfs_i(inode)->start, squashfs_i(inode)->offset);

That wants to be "dir". With CONFIG_DYNAMIC_DEBUG=y,

Yeah a fuckup because the other function used inode not dir.

Easily fixed, no big issue,

echo 'file fs/squashfs/namei.c +p' > /proc/dynamic_debug/control

and then any lookup which misses the dcache gives

BUG: unable to handle page fault for address: ffffffffffffffc8

RIP: 0010:squashfs_lookup+0x57/0x4f9

It is still there at the end of the series.

[10/23] now requires the fragment index to end exactly where the next

table starts. An image with 8 unused bytes there mounts and reads

correctly today and fails with -EINVAL with this patch (I made one by

hand to check).

This is correct. By design there is never any padding between metadata,

and any padding is incorrect. This has always been the case back since

No Squashfs filesystem should be able to hide information (like

malicious metadata) by adding padding between metadata tables.

If it is there, then someone is trying to do something naughty. The fact the previously sanity check didn't check for this, is

because it was added in the relaxed days of 2011, when the check

was needed to block a fuzzer, and the check added then was

sufficient. Now, if it is not 100% exact, something like

Sashiko will scream it is not sufficient.

[15/23] similarly starts rejecting a compressed block

whose size equals the block size. Is it certain that no version of

mksquashfs, and nothing else which writes Squashfs (squashfs-tools-ng,

the various Go and Rust libraries), ever produced either? If so, please

say that in the changelogs.

Well this is the rub isn't it. I didn't want to put it in, but

sashishito complained about the lack of it.

Now you're saying another fucking AI is complaining about it being in.

[18/23]-[20/23]: with a small index every entry is checked against its

neighbour at mount time. With the cached index that checking is gone

*and only the range check in _lookup_start() remains. I couldn't find

a way for that to go wrong, but is the difference intended?

[22/23] fixes a regression in mainline (5641371fd0b3) but sits on top

of [14/23]. If it should go to -stable it needs to come first. None of

the series is cc:stable at present - is that intended, given the

changelogs describe permission bypasses?

Yes, the difference is intended. The additional sanity checks make up for

it.

Small things:

- [01/23] isn't a pure conversion: SQUASHFS_COMPRESSED_SIZE() returned

32768 for a zero length and squashfs_compressed_size() returns 0.

Both end up as -EIO in squashfs_read_data(), so it's harmless, but

the changelog could say so.

Really. I don'have an AI and so I didn't notice. But if the AI

say so, well I'm only the fucking Squashfs author, and so what do

I know.

- [10/23]'s reproducer says fragment_table_start is at offset 72. It's

at 80, which is what the dd uses.

Shucks.

- [20/23] has "Read fragment indexes into memory" in the xattr code.

- msblk->lookup_table is the superblock's lookup_table_start, and

msblk->lookup_table_start is something else (the first metadata

block). Same for fragment_table and xattr_id_table. That's going

to confuse people.

I built each patch on x86_64 (W=1) and the result on i386 with and

without CONFIG_SQUASHFS_XATTR, and ran small hand-made uncompressed

images, including one with 2049-entry fragment and export indexes so

that the new caches are used; all read back correctly. I have not run

your reproducers, anything compressed, or xattrs.

I'm sorry Andrew but you have completely pissed me off.

I don't want you handling Squashfs from this day forwards.

I am almost at the point of resigning from Linu kernel Squashfs maintenance

due to the endless bullying I have received from you.

But I won't because then you will have won.

I am also CC'ing this to the LKML, and Phoronix to show that

that you have been bullying me for the last 4 weeks with my

patch sumission to my code.

Thanks for nothing.

Dr. Phillip Lougher

-- Phillip Lougher phillip@xxxxxxxxxxxxxxx

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @phillip lougher 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/squashfs-fix-a-lot-o…] indexed:0 read:5min 2026-12-01 · —