Repository navigation
NoMount v2.3.0
·
68 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
NoMount v2.3.0 is here! 🎉
The kernel driver and the metamodule must be updated together. There are no API-breaking changes (you can use the new module with previous kernel driver, and vice versa), but the amount of bug fixes below is large enough that running them out of sync is asking for trouble.
Small Changelog:
There are too many changes in this version, so this is sort of a summary of most important changes of this release :)
-
kernel/:
- Rules are now inode-based. A rule tracks the inode the path resolved to at add-time, not the path string. Rename or move the target and the rule keeps serving the same data as long as the inode is alive, and when the backing inode is gone (after unlink), the path is rebinded.
- Pre-opened backing file cache. Read-only opens of a redirected file reuse a cached
struct filepointing at the backing, so a redirectedopen+read+closecycle measures within ~80 ns of the native one. Eligibility is checked on first open (ext4/f2fs only,f_credpointer equality,S_ISREG). - Virtual inodes survive lookups. File rules now go through
iget5_lockedlike dir rules already did. The virtual inode stays in the dcache between accesses, which is what lets the pre-opened cache actually hit on repeated operations instead of the file being recreated per access. - Rule list reconstructs paths with
d_path. Paths are no longer stored in the kernel heap;NM_CMD_GET_LISTrebuilds them on demand fromr_path. Drops rule path strings from the heap and reports the path the rule actually serves.GET_LISTnow takesnm_mutexinstead ofrcu_read_locksod_pathcan sleep safely. - Revalidate is O(1). The virtual inode caches a reference to its leaf.
nm_d_revalidate_commonvalidates the parent dir and the child hash and returns, with no hash table walk and nomemcmpin the fast path (rare cases where this fails will fall into the slow path). - Child buckets store
{ leaf *, hash }inline, so bucket lookup compares the hash before dereferencing the leaf. nm_ruledroppedr_parent,r_name,r_name_len, and the path strings.nm rule addno longer copies names into a per-rule heap buffer.- Readdir resumes at the same child after rule changes. The cursor encodes a 16-bit hash fragment so
lsduring concurrentnm rule add/delno longer skips or duplicates entries. - OOB read fix in
nm_select_rulewhen a single-rule path uses--uid-rangescoping. - UAF fixes: leaves are retired via RCU instead of freed while still reachable from the hash; virtual dentries are dropped before restoring
s_op;nm clear rulesno longer blocks in the syscall path (it defers cleanup to a workqueue). - Security:
nm_xattr_setruns LSM checks viavfs_setxattr/vfs_removexattr; SUID/SGID bits are cleared on virtual inodes;unlink/rename/rmdirare now managed by NoMount on virtual dentries (previouslyf2fs_unlinkcould walk into a virtual inode and corrupt slab). - Cross-sb lookups use a proxy inode. When the backing dentry lives in a different
super_block(FUSE mounts, user-namespace bind mounts, etc), the lookup materializes a virtual inode that proxies to the backing dentry instead of touchingr_dir->i_op->lookup. Fixes theget_fuse_mount_supercrash, and the null dentry deref on the same path. - kernfs superblocks are tracked but never hijacked.
s_opis left untouched (no morecgroup2panic onunshare -C -m), xattr proxies still install.nm_hijack_superblockno longer skips them entirely. - Native view honored for blocked UIDs on opaque dirs. A blocked UID listing an opaque virtual directory now sees the real directory contents, not the empty opaque overlay.
- Default rule is protected from
unlink.nm_hijacked_unlinkrefuses to drop the fallback rule when the virtual path only has the default UID scope. - Boot-time speedup:
nm_prepare_native_fileresolves against the parent dentry viavfs_path_lookupinstead of callingkern_pathfrom/for every rule. - UID overlap/deny checks done directly; childless stub leaves pruned; child array slots reused for small counts; reclaim moved to process context.
-
userspace/:
nm rule addbatches in a single bounded pass (no more double walk for size).nm rule listflags completed requests so the driver returns clean empty pages.- UID range parsing shared between
addanddel.
-
module/:
MODDIRis now set inboot-completed.sh. Without it, the script silently failed to find its temp files, sonm clearnever ran and the bootloop safety net never triggered. Root cause of several "NoMount disabled itself after a reboot" reports.customize.shrestores multi-candidate LKM fallback (ko→lkmloader→ error)..removemarker recognized alongside.replace;rule-paths.shgainspath,pair,opaqueanddelkinds;metamount.shand WebUI hot load/unload now share the same flow.- Opaque directories with nonempty contents no longer abort the boot pipeline.
- Module logs now go to dmesg/logcat. The separate
module.logfile is not needed (and not used); everything routes through the dmesg, same log used by the driver, so both logs land in the same place. - Injection failures propagate to the WebUI as explicit
nm_load_status=N/nm_unload_status=Nmarkers instead of being swallowed by the script. android17-6.18LKM added to the pre-compilated LKM list of this module.
-
webui/:
- Module cards, app selector and exclusions are built with
document.createElement+textContentinstead ofinnerHTMLtemplates.realName(frommodule.prop),appLabel/pkg(fromksu.listPackages) and exclusionlabel/pkgall go throughtextContent. - App selector reuses the in-memory cache on reopen (no more 250+ ms spinner at reopen).
- Nav, switch and overlay render paths cut layout work: no transition on
grid-template-rows,transform-only switch thumb, and--nm-nav-background/--nm-scrim-mix/--nm-elevation-2precomputed inapplyAppearance()instead ofcolor-mix()per frame. - Module detection fixed:
readModulesruns once at boot and is shared between Home and Modules;updateModuleCardDOMaccepts a[modId]filter so a toggle only walks one module. - Locale fetch parallelized. Language selection moved to the Appearance group. Untranslated strings fall back to English.
- A new "Dump rules" toggle in Advanced writes rules to the log on every boot (debug only), and a "Dump rules now" button triggers it on demand.
- Module cards, app selector and exclusions are built with
and a lot of other misc changes :)
Thanks to everyone who kept testing, contributing and reporting through the rough bits: @ZQZCC, @nleloc, @sohan-f, and the testers on the Telegram group 🫂
Full Changelog: v2.2.0...v2.3.0-720