lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu,  1 Dec 2016 23:14:54 +0100
From:   Richard Weinberger <richard@....at>
To:     linux-mtd@...ts.infradead.org
Cc:     david@...ma-star.at, tytso@....edu, dedekind1@...il.com,
        ebiggers@...gle.com, mhalcrow@...gle.com, adrian.hunter@...el.com,
        linux-kernel@...r.kernel.org, hch@...radead.org,
        linux-fsdevel@...r.kernel.org, jaegeuk@...nel.org,
        dengler@...utronix.de, sbabic@...x.de, wd@...x.de,
        Richard Weinberger <richard@....at>
Subject: [PATCH 2/6] fscrypt: Release fscrypt context on in-place encryption

From: David Gstir <david@...ma-star.at>

In case of in-place encryption ctx must be released right away.
Otherwise ctx is never freed.

Fixes: 1c7dcf69eea3 ("fscrypt: Add in-place encryption mode")
Signed-off-by: David Gstir <david@...ma-star.at>
Signed-off-by: Richard Weinberger <richard@....at>
---
 fs/crypto/crypto.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index 3c1124beae28..1b877fcec1c1 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -270,6 +270,8 @@ struct page *fscrypt_encrypt_page(const struct inode *inode,
 		SetPagePrivate(ciphertext_page);
 		set_page_private(ciphertext_page, (unsigned long)ctx);
 		lock_page(ciphertext_page);
+	} else {
+		fscrypt_release_ctx(ctx);
 	}
 	return ciphertext_page;
 
-- 
2.7.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ