lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 19 Jul 2022 17:21:02 -0500
From:   "Eric W. Biederman" <ebiederm@...ssion.com>
To:     Hangyu Hua <hbh25y@...il.com>
Cc:     akpm@...ux-foundation.org, songmuchun@...edance.com,
        longman@...hat.com, roman.gushchin@...ux.dev, legion@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipc: mqueue: fix possible memory leak in init_mqueue_fs()

Hangyu Hua <hbh25y@...il.com> writes:

> commit db7cfc380900 ("ipc: Free mq_sysctls if ipc namespace creation
> failed")
>
> Here's a similar memory leak to the one fixed by the patch above.
> retire_mq_sysctls need to be called when init_mqueue_fs fails after
> setup_mq_sysctls.

Applied.  Thank you.

>
> Fixes: dc55e35f9e81 ("ipc: Store mqueue sysctls in the ipc namespace")
> Signed-off-by: Hangyu Hua <hbh25y@...il.com>
> ---
>  ipc/mqueue.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/ipc/mqueue.c b/ipc/mqueue.c
> index 12ad7860bb88..83370fef8879 100644
> --- a/ipc/mqueue.c
> +++ b/ipc/mqueue.c
> @@ -1746,6 +1746,7 @@ static int __init init_mqueue_fs(void)
>  	unregister_filesystem(&mqueue_fs_type);
>  out_sysctl:
>  	kmem_cache_destroy(mqueue_inode_cachep);
> +	retire_mq_sysctls(&init_ipc_ns);
>  	return error;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ