[3.16.y-ckt stable] Patch "fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Thu Jun 4 13:10:09 UTC 2015


This is a note to let you know that I have just added a patch titled

    fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt13.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From f06ca7b48865e51bb1e5491621da558136f11d8a Mon Sep 17 00:00:00 2001
From: Andrew Morton <akpm at linux-foundation.org>
Date: Thu, 28 May 2015 15:44:24 -0700
Subject: fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length
 mappings

commit 2b1d3ae940acd11be44c6eced5873d47c2e00ffa upstream.

load_elf_binary() returns `retval', not `error'.

Fixes: a87938b2e246b81b4fb ("fs/binfmt_elf.c: fix bug in loading of PIE binaries")
Reported-by: James Hogan <james.hogan at imgtec.com>
Cc: Michael Davidson <md at google.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 fs/binfmt_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 44bdf7b200c3..c13a138c1016 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -820,7 +820,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
 			total_size = total_mapping_size(elf_phdata,
 							loc->elf_ex.e_phnum);
 			if (!total_size) {
-				error = -EINVAL;
+				retval = -EINVAL;
 				goto out_free_dentry;
 			}
 		}




More information about the kernel-team mailing list