Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2018 08:59:51 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342030 - head/sys/opencrypto
Message-ID:  <201812130859.wBD8xp1X050856@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Thu Dec 13 08:59:51 2018
New Revision: 342030
URL: https://svnweb.freebsd.org/changeset/base/342030

Log:
  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
  MFC after:	1 week

Modified:
  head/sys/opencrypto/cryptosoft.c

Modified: head/sys/opencrypto/cryptosoft.c
==============================================================================
--- head/sys/opencrypto/cryptosoft.c	Thu Dec 13 06:59:55 2018	(r342029)
+++ head/sys/opencrypto/cryptosoft.c	Thu Dec 13 08:59:51 2018	(r342030)
@@ -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?201812130859.wBD8xp1X050856>