namespace: check a submount for references right before unmounting it
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 4.10, Kernel 18902a23ef36f83d32bafc58ae2484e6bb4bb8ef, Kernel 32bf92416614a1e3ff3524fc6b780259c7aad3ef and 16 more.
In the Linux kernel, the following vulnerability has been resolved: namespace: check a submount for references right before unmounting it shrink_submounts() and mark_mounts_for_expiry() first collect all the mounts they are allowed to unmount and then unmount them. Whether a mount is busy is decided by propagate_mount_busy() on the tree. But unmounting the first mount changes the tree that the second one propagates into. propagate_umount() 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 umount_tree(). It's childless and so trim_one() 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 MNT_SYNC_UMOUNT 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 MNT_SHRINKABLE, 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 namespace_sem and mount_lock as the umount itself. Make sure that the algorithm stays linear.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=4.9.15 <4.10, >=1064f874abc0d05eeed8993815f584d847b72486 <18902a23ef36f83d32bafc58ae2484e6bb4bb8ef, >=1064f874abc0d05eeed8993815f584d847b72486 <32bf92416614a1e3ff3524fc6b780259c7aad3ef, >=1064f874abc0d05eeed8993815f584d847b72486 <361f59e7f3f9a219fb5567bf9abc8482a154a399, >=1064f874abc0d05eeed8993815f584d847b72486 <3f55f71291e4332983cd63b288d1f2be3c9c08fc, >=1064f874abc0d05eeed8993815f584d847b72486 <6e4012e571867868b545c91ca9d6095fdb709907, >=1064f874abc0d05eeed8993815f584d847b72486 <cda0c4e502a0f74a191471ce100fb061e5ab35d6, >=1064f874abc0d05eeed8993815f584d847b72486 <d73f04e92c1aab78d96ac6cadb234c8a3a373d22, >=1064f874abc0d05eeed8993815f584d847b72486 <f6394281834492c6516a405a348b545ae698a331, >=4.1.40 <4.2, >=4.10.3 <4.11, >=4.4.54 <4.5, =4.11, =5e6ef5ef6eaf690faad3a7c6c665ebf45d7b6ccf, =6de9d08a9718ee9c12ba6343c50141c2d633e3dc, =808e83e5add13152bd4a88346487de68395c136b, =839d42687dfce0ed0ea2c6bd8d707cc0e276fbe7 | 4.10, 18902a23ef36f83d32bafc58ae2484e6bb4bb8ef, 32bf92416614a1e3ff3524fc6b780259c7aad3ef, 361f59e7f3f9a219fb5567bf9abc8482a154a399, 3f55f71291e4332983cd63b288d1f2be3c9c08fc, 6e4012e571867868b545c91ca9d6095fdb709907, cda0c4e502a0f74a191471ce100fb061e5ab35d6, d73f04e92c1aab78d96ac6cadb234c8a3a373d22, f6394281834492c6516a405a348b545ae698a331, 4.2, 4.11, 4.5 |
| linux-kernel: Kernel | >=4.10.3 <4.11, >=4.11.0 <5.10.273, >=4.4.54 <4.5, >=4.9.15 <4.10, >=5.11.0 <5.15.224, >=5.16.0 <6.1.191, >=6.13.0 <6.18.57, >=6.19.0 <7.2.11, >=6.2.0 <6.6.160, >=6.7.0 <6.12.113, >=4.1.40 <4.2 | 4.11, 5.10.273, 4.5, 4.10, 5.15.224, 6.1.191, 6.18.57, 7.2.11, 6.6.160, 6.12.113, 4.2 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket