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, 16 Jun 2020 08:33:18 +0300
From:   Amir Goldstein <amir73il@...il.com>
To:     youngjun <her0gyugyu@...il.com>
Cc:     Miklos Szeredi <miklos@...redi.hu>,
        overlayfs <linux-unionfs@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ovl: inode reference leak in ovl_is_inuse true case.

Hi youngjun!

Thank you for your patch.
You asked for guidance about posting patch revisions so let me repeat
my comment in a more clear way (see below).


On Tue, Jun 16, 2020 at 7:46 AM youngjun <her0gyugyu@...il.com> wrote:
>

When posting a revision of a patch already posted, the practice
is to use the subject prefix [PATCH v2].
This will be auto generated for you with -v option for git format-patch.

Also, it is not valuable to CC LKML on patches with such a narrow
scope. The only relevant CC for this patch is the overlayfs list,
overlayfs maintainer and developers that reviewed v1 (me in that case).

> When "ovl_is_inuse" true case, trap inode reference not put.
> plus adding the comment explaining sequence of
> ovl_is_inuse after ovl_setup_trap.
>

Please add these lines to the bottom of commit message:
(They help the stable tree maintainers know that patch
 should be picked up and to which stable tree)

Fixes: 0be0bfd2de9d ("ovl: fix regression caused by overlapping layers..")
Cc: <stable@...r.kernel.org> # v4.19+
Reviewed-by: Amir Goldstein <amir73il@...il.com>
> Signed-off-by: youngjun <her0gyugyu@...il.com>
> ---
>  fs/overlayfs/super.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
> index 91476bc422f9..0396793dadb8 100644
> --- a/fs/overlayfs/super.c
> +++ b/fs/overlayfs/super.c
> @@ -1029,6 +1029,12 @@ static const struct xattr_handler *ovl_xattr_handlers[] = {
>         NULL
>  };
>
> +/*
> + * Check if lower root conflicts with this overlay layers before checking
> + * if it is in-use as upperdir/workdir of "another" mount, because we do
> + * not bother to check in ovl_is_inuse() if the upperdir/workdir is in fact
> + * in-use by our upperdir/workdir.
> + */

Sorry for not being clear about this comment.
I meant it should come before the call to ovl_setup_trap() in
ovl_get_layers(). It is not true in general that we always call ovl_setup_trap()
before ovl_is_inuse(). It is only true and relevant for checking lower layers.

If anything I wrote is not clear, do not hesitate to ask for more clarification.

Thanks,
Amir.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ