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: <272361861.203885.1677949870976.JavaMail.zimbra@nod.at>
Date:   Sat, 4 Mar 2023 18:11:10 +0100 (CET)
From:   Richard Weinberger <richard@....at>
To:     chengzhihao1 <chengzhihao1@...wei.com>
Cc:     Miquel Raynal <miquel.raynal@...tlin.com>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        George Kennedy <george.kennedy@...cle.com>,
        linux-mtd <linux-mtd@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        yi zhang <yi.zhang@...wei.com>
Subject: Re: [PATCH v2] ubi: Fix failure attaching when vid_hdr offset
 equals to (sub)page size

----- Ursprüngliche Mail -----
> Von: "chengzhihao1" <chengzhihao1@...wei.com>
> +	/*
> +	 * Memory allocation for VID header is ubi->vid_hdr_alsize
> +	 * which is described in comments in io.c.
> +	 * Make sure VID header shift + UBI_VID_HDR_SIZE not exceeds
> +	 * ubi->vid_hdr_alsize, so that all vid header operations
> +	 * won't access memory out of bounds.
> +	 */
> +	if ((ubi->vid_hdr_shift + UBI_VID_HDR_SIZE) > ubi->vid_hdr_alsize) {
> +		ubi_err(ubi, "Invalid VID header offset %d, VID header shift(%d)"
> +			" + VID header size(%d) > VID header aligned size(%d).",
> +			ubi->vid_hdr_offset, ubi->vid_hdr_shift,
> +			(int)UBI_VID_HDR_SIZE, ubi->vid_hdr_alsize);

Hmm, why are you casting to int instead of using %zu as format string?

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ