Commit e49619d5 authored by Eric Biggers's avatar Eric Biggers Committed by Yongqiang Liu
Browse files

crypto: rsa-pkcs1pad - fix buffer overread in pkcs1pad_verify_complete()

mainline inclusion
from mainline-v5.18-rc1
commit a24611ea
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6HB6T


CVE: NA

--------------------------------

Before checking whether the expected digest_info is present, we need to
check that there are enough bytes remaining.

Fixes: a49de377 ("crypto: Add hash param to pkcs1pad")
Cc: <stable@vger.kernel.org> # v4.6+
Cc: Tadeusz Struk <tadeusz.struk@linaro.org>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Conflicts:
	crypto/rsa-pkcs1pad.c
Signed-off-by: default avatarGUO Zihua <guozihua@huawei.com>
Reviewed-by: default avatarWang Weiyang <wangweiyang2@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent d755712e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment