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: <740c57ad-0cbd-4498-8ec9-46a54b204e3d@oracle.com>
Date: Wed, 19 Feb 2025 15:20:47 -0600
From: Dave Kleikamp <dave.kleikamp@...cle.com>
To: Edward Adam Davis <eadavis@...com>,
        syzbot+7c808908291a569281a9@...kaller.appspotmail.com
Cc: axboe@...nel.dk, jfs-discussion@...ts.sourceforge.net,
        syzkaller-bugs@...glegroups.com, linux-kernel@...r.kernel.org,
        linux-block@...r.kernel.org, kristian@...usen.dk
Subject: Re: [Jfs-discussion] [PATCH] jfs: check agwidth before calculating
 the control page level

Catching up on long-ignored emails.

On 12/3/24 4:22AM, Edward Adam Davis via Jfs-discussion wrote:
> The width in dmapctl of the AG is zero, it trigger a divide error when
> calculating the control page level in dbAllocAG.
> 
> To avoid this issue, add a check for agwidth in dbAllocAG.

This value shouldn't change unless the filesystem is resized. I would 
prefer that the check was made once in dbMount().

Shaggy

> 
> Reported-and-tested-by: syzbot+7c808908291a569281a9@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=7c808908291a569281a9
> Signed-off-by: Edward Adam Davis <eadavis@...com>
> ---
>   fs/jfs/jfs_dmap.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
> index f9009e4f9ffd..2377102d9c4c 100644
> --- a/fs/jfs/jfs_dmap.c
> +++ b/fs/jfs/jfs_dmap.c
> @@ -1373,6 +1373,11 @@ dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results)
>   		return (rc);
>   	}
>   
> +	if (!bmp->db_agwidth) {
> +		jfs_error(bmp->db_ipbmap->i_sb, "width in dmapctl of the AG is zero\n");
> +		return -EIO;
> +	}
> +
>   	/* the buffer for the dmap control page that fully describes the
>   	 * allocation group.
>   	 */


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ