[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180323192358.95691-9-ebiggers3@gmail.com>
Date: Fri, 23 Mar 2018 12:23:52 -0700
From: Eric Biggers <ebiggers3@...il.com>
To: linux-fscrypt@...r.kernel.org, "Theodore Y . Ts'o" <tytso@....edu>
Cc: linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-mtd@...ts.infradead.org, Jaegeuk Kim <jaegeuk@...nel.org>,
Eric Biggers <ebiggers@...gle.com>
Subject: [PATCH 08/14] fscrypt: drop empty name check from fname_decrypt()
From: Eric Biggers <ebiggers@...gle.com>
fname_decrypt() is validating that the encrypted filename is nonempty.
However, earlier a stronger precondition was already enforced: the
encrypted filename must be at least 16 (FS_CRYPTO_BLOCK_SIZE) bytes.
Drop the redundant check for an empty filename.
Signed-off-by: Eric Biggers <ebiggers@...gle.com>
---
fs/crypto/fname.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c
index cc9590b5f371..c4eb3a235ae4 100644
--- a/fs/crypto/fname.c
+++ b/fs/crypto/fname.c
@@ -97,9 +97,6 @@ static int fname_decrypt(struct inode *inode,
int res = 0;
char iv[FS_CRYPTO_BLOCK_SIZE];
- if (iname->len <= 0)
- return -EIO;
-
/* Allocate request */
req = skcipher_request_alloc(tfm, GFP_NOFS);
if (!req)
--
2.17.0.rc0.231.g781580f067-goog
Powered by blists - more mailing lists