From ef6fb23322a62abae67af779d93535ff2051e17e Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 27 Jan 2021 15:31:10 -0500 Subject: [PATCH] safexcel: Disallow unsupported buffer layouts Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 2fccd4f9b6b96d75de87df4922eb2bf04fb0a67d) --- sys/dev/safexcel/safexcel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/safexcel/safexcel.c b/sys/dev/safexcel/safexcel.c index 3083f5f794f..71300dcb039 100644 --- a/sys/dev/safexcel/safexcel.c +++ b/sys/dev/safexcel/safexcel.c @@ -2272,6 +2272,9 @@ safexcel_probe_cipher(const struct crypto_session_params *csp) static int safexcel_probesession(device_t dev, const struct crypto_session_params *csp) { + if (csp->csp_flags != 0) + return (EINVAL); + switch (csp->csp_mode) { case CSP_MODE_CIPHER: if (!safexcel_probe_cipher(csp))