Re: [PATCH] ntfs3: prevent operations on NTFS system files

From: Deepanshu Kartikey

Date: Tue Oct 14 2025 - 12:01:48 EST


Hi Tetsuo,

You're absolutely right to question this. I made an error in my patch.

Looking at the debug logs again, the problematic inode is #25, which is
a file INSIDE the $Extend directory, not $Extend itself (which is inode 11).

My check `if (ni->mi.rno < MFT_REC_FREE)` only blocks inodes 0-15, so it
wouldn't actually block inode 25 at all. This means my additional check
doesn't solve the real problem.

Edward's simpler patch (just initializing run_lock for $Extend records)
is the correct minimal fix for this crash. I apologize for the confusion.

Thank you for catching this.

Best regards,
Deepanshu