unshare-fix-nsproxy-leak-on-set_cred_ucounts-error-path.patch removed from -mm tree
The quilt patch titled
Subject: unshare: fix nsproxy leak on set_cred_ucounts() error path
has been removed from the -mm tree. Its filename was
unshare-fix-nsproxy-leak-on-set_cred_ucounts-error-path.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Pavel Tikhomirov <[email protected]>
Subject: unshare: fix nsproxy leak on set_cred_ucounts() error path
Date: Tue, 18 Nov 2025 14:45:50 +0800
If unshare_nsproxy_namespaces() successfully creates the new_nsproxy, but then set_cred_ucounts() fails, on its error path there is no cleanup for new_nsproxy, so it is leaked. Let's fix that by freeing new_nsproxy if it's not NULL on this error path.
---
kernel/fork.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
kernel/fork.c renamed from kernel/fork.c~unshare-fix-nsproxy-leak-on-set_cred_ucounts-error-path +4 -1
@@ -3133,8 +3133,11 @@ int ksys_unshare(unsigned long unshare_fif (new_cred) { err =set_cred_ucounts (new_cred); -if (err) +if (err) { +if (new_nsproxy) +free_nsproxy (new_nsproxy); goto bad_unshare_cleanup_cred; + } }if (new_fs || new_fd || do_sysvsem || new_cred || new_nsproxy) {
_
Patches currently in -mm which might be from [email protected] are