aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi
Commit message (Collapse)AuthorAgeFilesLines
* crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()Mark O'Donovan2023-08-111-2/+6
| | | | | | | | | | | | During NVMeTCP Authentication a controller can trigger a kernel oops by specifying the 8192 bit Diffie Hellman group and passing a correctly sized, but zeroed Diffie Hellamn value. mpi_cmp_ui() was detecting this if the second parameter was 0, but 1 is passed from dh_is_pubkey_valid(). This causes the null pointer u->d to be dereferenced towards the end of mpi_cmp_ui() Signed-off-by: Mark O'Donovan <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
* crypto: lib - Move mpi into lib/cryptoHerbert Xu2023-08-1126-0/+7298
As lib/mpi is mostly used by crypto code, move it under lib/crypto so that patches touching it get directed to the right mailing list. Signed-off-by: Herbert Xu <[email protected]> Reviewed-by: Mimi Zohar <[email protected]> Signed-off-by: Herbert Xu <[email protected]>