Date: Thu, 20 Dec 2018 08:28:52 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342276 - stable/12/sys/opencrypto Message-ID: <201812200828.wBK8SqUx059684@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Thu Dec 20 08:28:51 2018 New Revision: 342276 URL: https://svnweb.freebsd.org/changeset/base/342276 Log: MFC r342030: Plug memory leak for AES_*_NIST_GMAC algorithms. swcr_newsession() allocates sw_ictx for these algorithms, thus we need to free() it in swcr_freesession(). PR: 233907 Modified: stable/12/sys/opencrypto/cryptosoft.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/12/sys/opencrypto/cryptosoft.c Thu Dec 20 05:46:56 2018 (r342275) +++ stable/12/sys/opencrypto/cryptosoft.c Thu Dec 20 08:28:51 2018 (r342276) @@ -1091,6 +1091,9 @@ swcr_freesession(device_t dev, crypto_session_t cses) case CRYPTO_SHA2_256: case CRYPTO_SHA2_384: case CRYPTO_SHA2_512: + case CRYPTO_AES_128_NIST_GMAC: + case CRYPTO_AES_192_NIST_GMAC: + case CRYPTO_AES_256_NIST_GMAC: axf = swd->sw_axf; if (swd->sw_ictx) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812200828.wBK8SqUx059684>