diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-01-27 20:31:10 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-01-30 00:39:15 +0000 |
commit | ef6fb23322a62abae67af779d93535ff2051e17e (patch) | |
tree | 49bba8ca783534f2847aac5543830b1c30ad645f | |
parent | 19d2d50e431895dc8a476a1b29ea92c033c87b2d (diff) | |
download | src-ef6fb23322a62abae67af779d93535ff2051e17e.tar.gz src-ef6fb23322a62abae67af779d93535ff2051e17e.zip |
safexcel: Disallow unsupported buffer layouts
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 2fccd4f9b6b96d75de87df4922eb2bf04fb0a67d)
-rw-r--r-- | sys/dev/safexcel/safexcel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/safexcel/safexcel.c b/sys/dev/safexcel/safexcel.c index 3083f5f794fe..71300dcb0393 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)) |