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

Kamal Mostafa kamal at canonical.com
Tue Jul 7 22:16:06 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.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

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

This patch is scheduled to be released in version 3.13.11-ckt23.

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.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 4cdf05b154ff10a23f8e2bc23db7e7c21eb6eed5 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: Kamal Mostafa <kamal 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 99b4bcf..509e7549 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -822,7 +822,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;
 			}
 		}
--
1.9.1





More information about the kernel-team mailing list