[4.2.y-ckt stable] Patch "ext4: fix an endianness bug in ext4_encrypted_follow_link()" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Fri Jan 15 20:12:05 UTC 2016
This is a note to let you know that I have just added a patch titled
ext4: fix an endianness bug in ext4_encrypted_follow_link()
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt2.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 34bbc9754a6ace47edd14d4fa0525cb7f374bfe8 Mon Sep 17 00:00:00 2001
From: Al Viro <viro at ZenIV.linux.org.uk>
Date: Thu, 26 Nov 2015 15:20:50 -0500
Subject: ext4: fix an endianness bug in ext4_encrypted_follow_link()
commit 5a1c7f47da9b32d0671e776b0f388095b7f91e2e upstream.
applying le32_to_cpu() to 16bit value is a bad idea...
Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
Signed-off-by: Theodore Ts'o <tytso at mit.edu>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
fs/ext4/symlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c
index c677f2c..3627fd7 100644
--- a/fs/ext4/symlink.c
+++ b/fs/ext4/symlink.c
@@ -52,7 +52,7 @@ static const char *ext4_encrypted_follow_link(struct dentry *dentry, void **cook
/* Symlink is encrypted */
sd = (struct ext4_encrypted_symlink_data *)caddr;
cstr.name = sd->encrypted_path;
- cstr.len = le32_to_cpu(sd->len);
+ cstr.len = le16_to_cpu(sd->len);
if ((cstr.len +
sizeof(struct ext4_encrypted_symlink_data) - 1) >
max_size) {
--
1.9.1
More information about the kernel-team
mailing list