]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cryptosoft: Reduce generality of supported algorithm composition
authorcem <cem@FreeBSD.org>
Fri, 17 Aug 2018 04:40:01 +0000 (04:40 +0000)
committercem <cem@FreeBSD.org>
Fri, 17 Aug 2018 04:40:01 +0000 (04:40 +0000)
commit8a86d15b0a857b5eb7ff49b99c334641fabcb058
tree904c52e7d89668f2f38a53240a969cb9a16c8c6f
parent1117e03b1efbe9f5044dce292cfd64ba9b54da38
cryptosoft: Reduce generality of supported algorithm composition

Fix a regression introduced in r336439.

Rather than allowing any linked list of algorithms, allow at most two
(typically, some combination of encrypt and/or MAC).  Removes a WAITOK
malloc in an unsleepable context (classic LOR) by placing both software
algorithm contexts within the OCF-managed session object.

Tested with 'cryptocheck -a all -d cryptosoft0', which includes some
encrypt-and-MAC modes.

PR: 230304
Reported by: sef@
sys/opencrypto/cryptosoft.c
sys/opencrypto/cryptosoft.h