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]
Date:	Tue, 1 Oct 2013 11:37:50 -0400
From:	jon ernst <jonernst07@...il.com>
To:	"Darrick J. Wong" <darrick.wong@...cle.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 02/31] libext2fs: Only link an inode into a directory once

On Mon, Sep 30, 2013 at 9:26 PM, Darrick J. Wong
<darrick.wong@...cle.com> wrote:
> The ext2fs_link helper function link_proc does not check the value of ls->done,
> which means that if the function finds multiple empty spaces that will fit the
> new directory entry, it will create a directory entry in each of the spaces.
> Instead of doing that, check the done value and don't do anything more if we've
> already added the directory entry.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
> ---
>  lib/ext2fs/link.c |    3 +++
>  1 file changed, 3 insertions(+)
>
>
> diff --git a/lib/ext2fs/link.c b/lib/ext2fs/link.c
> index f715067..e3ff450 100644
> --- a/lib/ext2fs/link.c
> +++ b/lib/ext2fs/link.c
> @@ -43,6 +43,9 @@ static int link_proc(struct ext2_dir_entry *dirent,
>         int ret = 0;
>         int csum_size = 0;
>
> +       if (ls->done)
> +               return 0;
maybe "return ret;" here to keep consistency.
> +
>         rec_len = EXT2_DIR_REC_LEN(ls->namelen);
>
>         ls->err = ext2fs_get_rec_len(ls->fs, dirent, &curr_rec_len);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ