From 91607afb55a1991ce47d9522ec8d3b79084387af Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 30 Sep 2021 16:00:36 +0200 Subject: [PATCH] Revert "crypto: public_key: fix overflow during implicit conversion" This reverts commit 5df14bba0056fb7d075dd6dc8c26ff3da33e4fc1 which is commit f985911b7bc75d5c98ed24d8aaa8b94c590f7c6a upstream and came in the 5.10.67 release. It breaks the ABI for the public_key_verify_signature() function. While it does fix a useful thing, it shouldn't be an issue for any Android devices so reverting should be safe. Fixes: 5df14bba0056 ("crypto: public_key: fix overflow during implicit conversion") Cc: Will Deacon Signed-off-by: Greg Kroah-Hartman Change-Id: I30ee9fec7d778b5d10483917975dd0ebe14aab88 --- include/crypto/public_key.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h index f5bd80858fc5..948c5203ca9c 100644 --- a/include/crypto/public_key.h +++ b/include/crypto/public_key.h @@ -39,9 +39,9 @@ extern void public_key_free(struct public_key *key); struct public_key_signature { struct asymmetric_key_id *auth_ids[2]; u8 *s; /* Signature */ - u8 *digest; u32 s_size; /* Number of bytes in signature */ - u32 digest_size; /* Number of bytes in digest */ + u8 *digest; + u8 digest_size; /* Number of bytes in digest */ const char *pkey_algo; const char *hash_algo; const char *encoding;