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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Mar 2022 14:43:49 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Ard Biesheuvel <ardb@...nel.org>,
        Eric Biggers <ebiggers@...gle.com>,
        Herbert Xu <herbert@...dor.apana.org.au>
Cc:     Ziyang Xuan <william.xuanziyang@...wei.com>, <borisp@...dia.com>,
        <john.fastabend@...il.com>, <daniel@...earbox.net>,
        <davem@...emloft.net>, <pabeni@...hat.com>,
        <netdev@...r.kernel.org>, <vakul.garg@....com>,
        <davejwatson@...com>, <linux-kernel@...r.kernel.org>,
        Vadim Fedorenko <vfedorenko@...ek.ru>,
        linux-crypto@...r.kernel.org
Subject: Re: [PATCH net] net/tls: fix slab-out-of-bounds bug in
 decrypt_internal

On Wed, 30 Mar 2022 13:24:06 -0700 Jakub Kicinski wrote:
> Noob question for crypto folks, ivsize for AES CCM is reported 
> as 16, but the real nonce size is 13 for TLS (q == 2, n == 13
> using NIST's variable names AFAICT). Are we required to zero out 
> the rest of the buffer?

I guess we don't, set_msg_len() explicitly clears the tail of 
the buffer. Hopefully KASAN won't be upset about the uninit
read in format_input(), since it memcpy()s the entire 16B of iv.

> In particular I think I've seen transient crypto failures with
> SM4 CCM in the past and zeroing the tail of the iv buffer seems
> to make the tests pass reliably.

Powered by blists - more mailing lists