Re: [PATCH] binfmt_misc: don't leak the user namespace when the mount fails
[email protected] Sun, 09 Aug 2026 22:37:44 +0000
| Newsgroups | gmane.linux.kernel.stable,gmane.linux.file-systems,gmane.linux.kernel.mm,gmane.linux.kernel.bpf |
|---|---|
| Message-ID | <178631506414.3049071.14867849911905814452.git-patchwork-notify@kernel.org> |
Hello: This patch was applied to bpf/bpf.git (master) by Christian Brauner <[email protected]>: On Tue, 28 Jul 2026 15:48:10 +0200 you wrote: > bm_get_tree() takes a reference to the user namespace and hands it to > get_tree_keyed() as the sget key. sget_fc() moves that reference into > sb->s_fs_info and clears fc->s_fs_info, so from that point on the > superblock owns it and bm_free() doesn't see it anymore. > > The superblock drops it in ->put_super(). But generic_shutdown_super() > only calls ->put_super() from inside the if (sb->s_root) branch, so > nothing releases it when bm_fill_super() fails: > > [...] Here is the summary with links: - binfmt_misc: don't leak the user namespace when the mount fails https://git.kernel.org/bpf/bpf/c/b8206f516fe7 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html