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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5416e506-e888-41b2-aea3-1155c74d91ea@linux.alibaba.com>
Date: Tue, 23 Sep 2025 20:08:34 +0800
From: Joseph Qi <joseph.qi@...ux.alibaba.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 Goldwyn Rodrigues <rgoldwyn@...e.de>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: Mark Fasheh <mark@...heh.com>, Joel Becker <jlbec@...lplan.org>,
 ocfs2-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ocfs2: fix double free in user_cluster_connect()



On 2025/9/23 19:26, Dan Carpenter wrote:
> The user_cluster_disconnect() function frees "conn->cc_private" which is
> "lc" but then the error handling frees "lc" a second time.  Set "lc" to
> NULL on this path to avoid a double free.
> 
> Fixes: c994c2ebdbbc ("ocfs2: use the new DLM operation callbacks while requesting new lockspace")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

Looks fine.
Reviewed-by: Joseph Qi <joseph.qi@...ux.alibaba.com>

> ---
>  fs/ocfs2/stack_user.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
> index 765105f1ff8a..be0a5758bd40 100644
> --- a/fs/ocfs2/stack_user.c
> +++ b/fs/ocfs2/stack_user.c
> @@ -1011,6 +1011,7 @@ static int user_cluster_connect(struct ocfs2_cluster_connection *conn)
>  			printk(KERN_ERR "ocfs2: Could not determine"
>  					" locking version\n");
>  			user_cluster_disconnect(conn);
> +			lc = NULL;
>  			goto out;
>  		}
>  		wait_event(lc->oc_wait, (atomic_read(&lc->oc_this_node) > 0));


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ