All of lore.kernel.org
 help / color / mirror / Atom feed
* + ecryptfs-regression-in-unencrypted-filename-symlinks.patch added to -mm tree
@ 2009-02-07 20:10 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-02-07 20:10 UTC (permalink / raw)
  To: mm-commits; +Cc: tyhicks, shaggy


The patch titled
     eCryptfs: regression in unencrypted filename symlinks
has been added to the -mm tree.  Its filename is
     ecryptfs-regression-in-unencrypted-filename-symlinks.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: eCryptfs: regression in unencrypted filename symlinks
From: Tyler Hicks <tyhicks@linux.vnet.ibm.com>

The addition of filename encryption caused a regression in unencrypted
filename symlink support.  ecryptfs_copy_filename() is used when dealing
with unencrypted filenames and it reported that the new, copied filename
was a character longer than it should have been.

This caused the return value of readlink() to count the NULL byte of the
symlink target.  Most applications don't care about the extra NULL byte,
but a version control system (bzr) helped in discovering the bug.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ecryptfs/crypto.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/ecryptfs/crypto.c~ecryptfs-regression-in-unencrypted-filename-symlinks fs/ecryptfs/crypto.c
--- a/fs/ecryptfs/crypto.c~ecryptfs-regression-in-unencrypted-filename-symlinks
+++ a/fs/ecryptfs/crypto.c
@@ -1716,7 +1716,7 @@ static int ecryptfs_copy_filename(char *
 {
 	int rc = 0;
 
-	(*copied_name) = kmalloc((name_size + 2), GFP_KERNEL);
+	(*copied_name) = kmalloc((name_size + 1), GFP_KERNEL);
 	if (!(*copied_name)) {
 		rc = -ENOMEM;
 		goto out;
@@ -1726,7 +1726,7 @@ static int ecryptfs_copy_filename(char *
 						 * in printing out the
 						 * string in debug
 						 * messages */
-	(*copied_name_size) = (name_size + 1);
+	(*copied_name_size) = name_size;
 out:
 	return rc;
 }
_

Patches currently in -mm which might be from tyhicks@linux.vnet.ibm.com are

ecryptfs-regression-in-unencrypted-filename-symlinks.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-07 20:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-07 20:10 + ecryptfs-regression-in-unencrypted-filename-symlinks.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.