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: <Z21jEkVKwzrpxjW_@gondor.apana.org.au>
Date: Thu, 26 Dec 2024 22:07:14 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Atharva Tiwari <evepolonium@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>, linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org, Eric Biggers <ebiggers@...nel.org>
Subject: Re: [PATCH] crypto: vmac: fix misaligned pointer handling in
 vmac_update

On Thu, Dec 26, 2024 at 07:18:47PM +0530, Atharva Tiwari wrote:
> Handle pontential misalignment of the input pointer(p) in vmac_update
> by copying the data to a temp buffer before processing.
> 
> Signed-off-by: Atharva Tiwari <evepolonium@...il.com>
> ---
>  crypto/vmac.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/crypto/vmac.c b/crypto/vmac.c
> index 2ea384645ecf..8383a98ad778 100644
> --- a/crypto/vmac.c
> +++ b/crypto/vmac.c
> @@ -518,9 +518,19 @@ static int vmac_update(struct shash_desc *desc, const u8 *p, unsigned int len)
>  
>  	if (len >= VMAC_NHBYTES) {
>  		n = round_down(len, VMAC_NHBYTES);
> -		/* TODO: 'p' may be misaligned here */
> -		vhash_blocks(tctx, dctx, (const __le64 *)p, n / VMAC_NHBYTES);
> -		p += n;

Please use the get_unaligned_le64 helper instead of copying.

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