Patch "f2fs crypto: fix corrupted symlink in encrypted case" has been added to the 4.5-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
f2fs crypto: fix corrupted symlink in encrypted case
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
f2fs-crypto-fix-corrupted-symlink-in-encrypted-case.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c90e09f7fb498f81cd4e8bb6460d3a26ccebeca3Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <[email protected]>
Date: Wed, 30 Mar 2016 13:13:16 -0700
Subject: f2fs crypto: fix corrupted symlink in encrypted case
From: Jaegeuk Kim <[email protected]>
commit c90e09f7fb498f81cd4e8bb6460d3a26ccebeca3 upstream.
In the encrypted symlink case, we should check its corrupted symname after decrypting it.
Otherwise, we can report -ENOENT incorrectly, if encrypted symname starts with '\0'.
--- fs/f2fs/namei.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
fs/f2fs/namei.c +6 -6
@@ -980,12 +980,6 @@ static const char *f2fs_encrypted_get_li }memcpy (cstr.name, sd->encrypted_path, cstr.len); -/* this is broken symlink case */ -if (unlikely (cstr.name[0 ] ==0 )) { - res = -ENOENT ; - goto errout; - } -if ((cstr.len +sizeof (struct f2fs_encrypted_symlink_data ) -1 ) > max_size) {/* Symlink data on the disk is corrupted */
@@ -1002,6 +996,12 @@ static const char *f2fs_encrypted_get_likfree (cstr.name); +/* this is broken symlink case */ +if (unlikely (pstr.name[0 ] ==0 )) { + res = -ENOENT ; + goto errout; + } + paddr = pstr.name;/* Null-terminate the name */
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/f2fs-slightly-reorganize-read_raw_super_block.patch queue-4.5/f2fs-crypto-fix-corrupted-symlink-in-encrypted-case.patch