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]
Message-ID: <CAOQ4uxiO9GJVK9wtjSMoajUMRVOAdriiygDf4NqrKZna5f5zTA@mail.gmail.com>
Date: Fri, 28 Nov 2025 10:54:14 +0100
From: Amir Goldstein <amir73il@...il.com>
To: NeilBrown <neil@...wn.name>
Cc: syzbot <syzbot+bfc9a0ccf0de47d04e8c@...kaller.appspotmail.com>, 
	brauner@...nel.org, linux-kernel@...r.kernel.org, 
	linux-unionfs@...r.kernel.org, miklos@...redi.hu, 
	syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] ovl: fail ovl_lock_rename_workdir() if either target is unhashed

On Fri, Nov 28, 2025 at 2:22 AM NeilBrown <neilb@...mail.net> wrote:
>
>
> From: NeilBrown <neil@...wn.name>
>
> As well as checking that the parent hasn't changed after getting the
> lock we need to check that the dentry hasn't been unhashed.
> Otherwise we might try to rename something that has been removed.
>
> Reported-by: syzbot+bfc9a0ccf0de47d04e8c@...kaller.appspotmail.com
> Fixes: d2c995581c7c ("ovl: Call ovl_create_temp() without lock held.")
> Signed-off-by: NeilBrown <neil@...wn.name>

Reviewed-by: Amir Goldstein <amir73il@...il.com>

> ---
>  fs/overlayfs/util.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
> index f76672f2e686..82373dd1ce6e 100644
> --- a/fs/overlayfs/util.c
> +++ b/fs/overlayfs/util.c
> @@ -1234,9 +1234,9 @@ int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *work,
>                 goto err;
>         if (trap)
>                 goto err_unlock;
> -       if (work && work->d_parent != workdir)
> +       if (work && (work->d_parent != workdir || d_unhashed(work)))
>                 goto err_unlock;
> -       if (upper && upper->d_parent != upperdir)
> +       if (upper && (upper->d_parent != upperdir || d_unhashed(upper)))
>                 goto err_unlock;
>
>         return 0;
> --
> 2.50.0.107.gf914562f5916.dirty
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ