From owner-svn-src-all@freebsd.org Thu Dec 20 08:33:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2950133BF30; Thu, 20 Dec 2018 08:33:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F80D6CECF; Thu, 20 Dec 2018 08:33:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A12423141; Thu, 20 Dec 2018 08:33:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBK8XCmU064685; Thu, 20 Dec 2018 08:33:12 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBK8XCJ3064684; Thu, 20 Dec 2018 08:33:12 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201812200833.wBK8XCJ3064684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 20 Dec 2018 08:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342277 - stable/11/sys/opencrypto X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/opencrypto X-SVN-Commit-Revision: 342277 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6F80D6CECF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2018 08:33:13 -0000 Author: ae Date: Thu Dec 20 08:33:11 2018 New Revision: 342277 URL: https://svnweb.freebsd.org/changeset/base/342277 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/11/sys/opencrypto/cryptosoft.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/11/sys/opencrypto/cryptosoft.c Thu Dec 20 08:28:51 2018 (r342276) +++ stable/11/sys/opencrypto/cryptosoft.c Thu Dec 20 08:33:11 2018 (r342277) @@ -1054,6 +1054,9 @@ swcr_freesession_locked(device_t dev, u_int64_t tid) case CRYPTO_MD5: case CRYPTO_SHA1: + 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)