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: <8fb6638f-1e99-a1c1-3fa1-f814d08d2659@suse.com>
Date:   Wed, 26 Apr 2023 20:25:14 +0800
From:   Qu Wenruo <wqu@...e.com>
To:     Анастасия Белова 
        <abelova@...ralinux.ru>, Chris Mason <clm@...com>
Cc:     Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH] btrfs: parent bytenr must be aligned to sector size



On 2023/4/26 19:53, Анастасия Белова wrote:
> From: Anastasia Belova <abelova@...ralinux.ru>
> 
> Change nodesize to sectorsize in alignment check
> in print_extent_item. Change requirement in comment.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: ea57788eb76d ("btrfs: require only sector size alignment for parent eb bytenr")
> Signed-off-by: Anastasia Belova <abelova@...ralinux.ru>

Reviewed-by: Qu Wenruo <wqu@...e.com>

A little surprised that a static checker can even find such hidden problem.

Thanks,
Qu
> ---
>   fs/btrfs/print-tree.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
> index b93c96213304..cee005fb8209 100644
> --- a/fs/btrfs/print-tree.c
> +++ b/fs/btrfs/print-tree.c
> @@ -152,9 +152,9 @@ static void print_extent_item(struct extent_buffer *eb, int slot, int type)
>   			       offset, btrfs_shared_data_ref_count(eb, sref));
>   			/*
>   			 * offset is supposed to be a tree block which
> -			 * must be aligned to nodesize.
> +			 * must be aligned to sectorsize.
>   			 */
> -			if (!IS_ALIGNED(offset, eb->fs_info->nodesize))
> +			if (!IS_ALIGNED(offset, eb->fs_info->sectorsize))
>   				pr_info(
>   			"\t\t\t(parent %llu not aligned to sectorsize %u)\n",
>   				     offset, eb->fs_info->sectorsize);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ