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: <20220131110003.7aacad70@xps13>
Date:   Mon, 31 Jan 2022 11:00:03 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Jean-Marc Eurin <jmeurin@...gle.com>
Cc:     Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix the size of the header read buffer.

Hi Jean-Marc,

jmeurin@...gle.com wrote on Fri, 28 Jan 2022 14:01:56 -0800:

> The read buffer size depends on the MTDOOPS_HEADER_SIZE.
> 
> Tested: Changed the header size, it doesn't panic, header is still
> read/written correctly.

On what Linux kernel version are you? It looks like we don't share the
same code base, are we?

> 
> Signed-off-by: Jean-Marc Eurin <jmeurin@...gle.com>
> ---
>  drivers/mtd/mtdoops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
> index 227df24387df..09a26747f490 100644
> --- a/drivers/mtd/mtdoops.c
> +++ b/drivers/mtd/mtdoops.c
> @@ -223,7 +223,7 @@ static void find_next_position(struct mtdoops_context *cxt)
>  {
>  	struct mtd_info *mtd = cxt->mtd;
>  	int ret, page, maxpos = 0;
> -	u32 count[2], maxcount = 0xffffffff;
> +	u32 count[MTDOOPS_HEADER_SIZE/sizeof(u32)], maxcount = 0xffffffff;
>  	size_t retlen;
>  
>  	for (page = 0; page < cxt->oops_pages; page++) {


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ