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]
Date:   Fri, 17 Dec 2021 15:51:50 +1100
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Kees Cook <keescook@...omium.org>
Cc:     Boris Brezillon <bbrezillon@...nel.org>,
        Arnaud Ebalard <arno@...isbad.org>,
        Srujana Challa <schalla@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        Suheil Chandran <schandran@...vell.com>,
        Shijith Thotton <sthotton@...vell.com>,
        Lukasz Bartosik <lbartosik@...vell.com>,
        linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] crypto: octeontx2 - Avoid stack variable overflow

On Wed, Dec 15, 2021 at 02:55:58PM -0800, Kees Cook wrote:
>> @@ -1762,7 +1762,7 @@ void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf)
>  	char engs_info[2 * OTX2_CPT_NAME_LENGTH];
>  	struct otx2_cpt_eng_grp_info *grp;
>  	struct otx2_cpt_engs_rsvd *engs;
> -	u32 mask[4];
> +	u32 mask[5];

Are you sure 144 bits will overflow u32[4]? If not then shouldn't
the fix be to remove the bogus print on mask[4]?

On another note, the debug code looks like crap if engs_num is
less than the maximum of 144 as it will print random data from
the kernel stack.

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ