Re: [PATCH] crypto: vmac - Handle unaligned input in vmac_update
From: Eric Biggers
Date: Thu Dec 26 2024 - 14:05:28 EST
On Thu, Dec 26, 2024 at 10:30:49PM +0530, Atharva Tiwari wrote:
> The `vmac_update` function previously assumed that `p` was aligned,
> which could lead to misaligned memory accesses when processing blocks.
> This patch resolves the issue by,
> introducing a temporary buffer to ensure alignment.
>
> Changes include:
> - Allocating a temporary buffer (`__le64 *data`) to store aligned blocks.
> - Using `get_unaligned_le64` to safely read data into the temporary buffer.
> - Iteratively processing blocks with the `vhash_blocks` function.
> - Properly freeing the allocated temporary buffer after processing.
>
> Signed-off-by: Atharva Tiwari <evepolonium@xxxxxxxxx>
Are you using vmac for something? As far as I know it is unused upstream, and
we should just remove it instead.
- Eric