cryptodev: fix asymmetric private session variable size
authorCiara Power <ciara.power@intel.com>
Fri, 18 Feb 2022 12:57:52 +0000 (12:57 +0000)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 22 Feb 2022 19:00:57 +0000 (20:00 +0100)
commit080c84cde42fd06443b02f495cd0397a490a1f71
tree8670cfde5fb2071056e60a15d7bddcd18e2801cb
parentf819a1629b1ccc9ed74e17374e26507a490058ac
cryptodev: fix asymmetric private session variable size

When creating the asymmetric session mempool, the maximum private
session size of all devices is used when creating the mempool
object size.
The return value for ``rte_cryptodev_asym_get_private_session_size``
is unsigned int, whereas the variable was uint8_t, leading to a
possible overflow issue.

To fix this, the variable for private session size is now changed to
unsigned int to match the function return type.

Fixes: 1f1e4b7cbaad ("cryptodev: use single mempool for asymmetric session")

Reported-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
lib/cryptodev/rte_cryptodev.c