[PATCH] crypto/cnxk: improve RSA private key validation
Akhil Goyal
gakhil at marvell.com
Mon Nov 9 20:58:46 CET 2026
> -----Original Message-----
> From: Sucharitha Sarananaga <ssarananaga at marvell.com>
> Sent: Friday, October 9, 2026 5:06 PM
> To: dev at dpdk.org
> Cc: Akhil Goyal <gakhil at marvell.com>; fanzhang.oss at gmail.com; Ankur Dwivedi
> <adwivedi at marvell.com>; Anoob Joseph <anoobj at marvell.com>; Tejasree
> Kondoj <ktejasree at marvell.com>; kai.ji at intel.com; jianjay.zhou at huawei.com;
> radu.nicolau at intel.com; Gowrishankar Muthukrishnan
> <gmuthukrishn at marvell.com>; Sucharitha Sarananaga
> <ssarananaga at marvell.com>
> Subject: [PATCH] crypto/cnxk: improve RSA private key validation
>
> Add upfront RSA modulus length validation and reject zero-length or
> unsupported modulus sizes. Validate CRT key component pointers and
> lengths, validate private exponent length, and derive the actual CRT
> key size from component lengths instead of relying solely on modulus
> size.
>
> Also round up the half-modulus bound used for CRT parameters so
> odd-length moduli do not incorrectly reject valid factors.
>
> These checks ensure RSA key material fits within CNXK hardware limits,
> prevent invalid parameter acceptance, and avoid potential NULL pointer
> dereferences.
>
> Signed-off-by: Sucharitha Sarananaga <ssarananaga at marvell.com>
Applied to dpdk-next-crypto
Thanks.
More information about the dev
mailing list