CVE-2026-98990: namespace: check a submount for references right before unmounting it
In the Linux kernel, the following vulnerability has been resolved:
namespace: check a submount for references right before unmounting it
shrinksubmounts() and markmountsforexpiry() first collect all the mounts they are allowed to unmount and then unmount them.
Whether a mount is busy is decided by propagatemountbusy() on the tree. But unmounting the first mount changes the tree that the second one propagates into. propagateumount() moves a surviving overmount off a copy it unmounts and mounts it where the copy was mounted. If that's where the propagated copy of the second victim is looked up the overmount becomes a candidate of the second umounttree(). It's childless and so trimone() commits it without looking at its reference count.
So a synchronous umount pulls out a busy mount that is in use somewhere else and marks it MNTSYNCUMOUNT while it has users:
umount2(/tmp/plshrink/p1, 0) = 0 errno 0 cwd is (unreachable)
The same two umounts requested one after the other fail with EBUSY. This needs a mount with MNTSHRINKABLE, i.e., automounted submounts of NFS, AFS and CIFS or the tracefs mount below debugfs. Bind mounts inherit the flag.
Check each mount right before it is unmounted under the same hold of namespacesem and mountlock as the umount itself. Make sure that the algorithm stays linear.