git: opencrypto: Update aes_ctr_setkey() to validate key bits to avoid panic
Aaron LI
aly at crater.dragonflybsd.org
Fri Nov 17 18:03:42 PST 2023
commit 4336ef7ed876ae659374d5c5976d3a0c6020a07a
Author: Aaron LI <aly at aaronly.me>
Date: Sat Nov 18 09:57:53 2023 +0800
opencrypto: Update aes_ctr_setkey() to validate key bits to avoid panic
AES rijndaelKeySetupEnc() only accepts key of length 128/192/256 bits
and it uses a KASSERT() to assert this. However, aes_ctr_setkey() can
be given an improper key via ioctl() and thus panic the system. Fix
this panic by validating the key in aes_ctr_setkey() before calling
rijndaelKeySetupEnc().
This partially resolves bug #3311.
Bug: https://bugs.dragonflybsd.org/issues/3311
Summary of changes:
sys/opencrypto/xform.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4336ef7ed876ae659374d5c5976d3a0c6020a07a
--
DragonFly BSD source repository
More information about the Commits
mailing list