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: <345e0d5c-b01b-361d-fbb1-a0c6b093431e@linux.alibaba.com>
Date:   Thu, 16 Nov 2023 16:52:23 +0800
From:   Jingbo Xu <jefflexu@...ux.alibaba.com>
To:     Hangyu Hua <hbh25y@...il.com>, miklos@...redi.hu, vgoyal@...hat.com
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: fuse: dax: set fc->dax to NULL in
 fuse_dax_conn_free()



On 11/16/23 3:57 PM, Hangyu Hua wrote:
> fuse_dax_conn_free() will be called when fuse_fill_super_common() fails
> after fuse_dax_conn_alloc(). Then deactivate_locked_super() in
> virtio_fs_get_tree() will call virtio_kill_sb() to release the discarded
> superblock. This will call fuse_dax_conn_free() again in fuse_conn_put(),
> resulting in a possible double free.
> 
> Fixes: 1dd539577c42 ("virtiofs: add a mount option to enable dax")
> Signed-off-by: Hangyu Hua <hbh25y@...il.com>

Reviewed-by: Jingbo Xu <jefflexu@...ux.alibaba.com>

> ---
>  fs/fuse/dax.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
> index 23904a6a9a96..12ef91d170bb 100644
> --- a/fs/fuse/dax.c
> +++ b/fs/fuse/dax.c
> @@ -1222,6 +1222,7 @@ void fuse_dax_conn_free(struct fuse_conn *fc)
>  	if (fc->dax) {
>  		fuse_free_dax_mem_ranges(&fc->dax->free_ranges);
>  		kfree(fc->dax);
> +		fc->dax = NULL;
>  	}
>  }
>  

-- 
Thanks,
Jingbo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ