From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91F43304BCB; Sat, 30 May 2026 17:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780163413; cv=none; b=OlOXBy7FceyNE2555GYTIL87eMkmDuTjTzCJo6z6GYRTSHOPDstr5TzDa5e5J/j0waV9IxrQwo1f7/DhD6xrzWf9DRBdrsbmKed8T5AitNe8npqLoO3B//80dAOsAQH3+tD2mm04YQjL3yurtA0riVv5cFHoZ4bSH+7b5ij+e7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780163413; c=relaxed/simple; bh=bndwLFz3sY9vjAqe8eB5wuM8YoIjrHdPnCdxFdY/JS4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qSPajjpJeBm7B7+tegYUgx3ktBK7t85/NzUKyFPs8UJdfQna5vOgbDuV81OQu3tBFqx9EhWNa35dp1GIGwMmUq7b4ZtUvBRFjf9KUMJgjCf9VXmHsqS7ri76vgKXF/rmuNh0XPVPScewlaBVmArVbA7UUATOMt8VVJn9zXrd8UM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FGt/z83X; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FGt/z83X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EB5C1F00893; Sat, 30 May 2026 17:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780163412; bh=YFD6RnKIslig/V7bkA06iF2wzr7ttusETOsyGqe6Zao=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FGt/z83XN1fYPVnnsQbFS/U0ZkTtea+gnCBXOsqquDEt9Nbc9+qNoCZ9zOonBsIrz hhYREQk6HMQkGLMZc9FJY+ud3U6QTrD/F3var5kBNlj4mLjpmaj+s55fHmBOkyA8b2 RN8JyUgjI1LsEDawMsSQ22OLNZSUR2SnspknH7S4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ard Biesheuvel , Eric Biggers Subject: [PATCH 5.15 250/776] crypto: arm64/aes - Fix 32-bit aes_mac_update() arg treated as 64-bit Date: Sat, 30 May 2026 17:59:24 +0200 Message-ID: <20260530160246.994393860@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160240.228940103@linuxfoundation.org> References: <20260530160240.228940103@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Biggers commit f8f08d7cc43237e91e3aedf7b67d015d24c38fcc upstream. Since the 'enc_after' argument to neon_aes_mac_update() and ce_aes_mac_update() has type 'int', it needs to be accessed using the corresponding 32-bit register, not the 64-bit register. The upper half of the corresponding 64-bit register may contain garbage. Fixes: 4860620da7e5 ("crypto: arm64/aes - add NEON/Crypto Extensions CBCMAC/CMAC/XCBC driver") Cc: stable@vger.kernel.org Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20260218213501.136844-4-ebiggers@kernel.org Signed-off-by: Eric Biggers Signed-off-by: Greg Kroah-Hartman --- arch/arm64/crypto/aes-modes.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm64/crypto/aes-modes.S +++ b/arch/arm64/crypto/aes-modes.S @@ -697,7 +697,7 @@ AES_FUNC_START(aes_mac_update) encrypt_block v0, w2, x1, x7, w8 eor v0.16b, v0.16b, v4.16b cmp w3, wzr - csinv x5, x6, xzr, eq + csinv w5, w6, wzr, eq cbz w5, .Lmacout encrypt_block v0, w2, x1, x7, w8 st1 {v0.16b}, [x4] /* return dg */ @@ -711,7 +711,7 @@ AES_FUNC_START(aes_mac_update) eor v0.16b, v0.16b, v1.16b /* ..and xor with dg */ subs w3, w3, #1 - csinv x5, x6, xzr, eq + csinv w5, w6, wzr, eq cbz w5, .Lmacout .Lmacenc: