mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
crypto: rockchip: v2: akcipher: prevent input data overflow
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com> Change-Id: I39442e8e8ad1897b454da451090fbe867d6b26d6
This commit is contained in:
@@ -149,6 +149,9 @@ static int rk_rsa_calc(struct akcipher_request *req, bool encypt)
|
||||
return -EOVERFLOW;
|
||||
}
|
||||
|
||||
if (req->src_len > key_byte_size)
|
||||
return -EINVAL;
|
||||
|
||||
in = rk_bn_alloc(key_byte_size);
|
||||
if (!in)
|
||||
goto exit;
|
||||
|
||||
Reference in New Issue
Block a user