[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Correct patch for "kernel ELF core dump privilege elevation" ?



On Thu, May 12, 2005 at 10:41:15PM +0200, Wolfgang Pfeiffer wrote:
> Hi all
> 
> I can't code, so I have to ask somewhere whether the patch I found for
> the mentioned problem is good code:
> 
> <http://www.derkeiler.com/Mailing-Lists/securityfocus/bugtraq/2005-05/0131.html>
> 
> It applied without problems to 2.6.12-rc4, so I'd be glad if someone

Better: It seems, it applied correctly ..


And here's the patch I found on the mentioned page:

---------------------------
As noted by Paul Starzetz

references CAN-something-I-need-to-go-look-up...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/binfmt_elf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--- gregkh-2.6.orig/fs/binfmt_elf.c	2005-05-11 00:03:45.000000000 -0700
+++ gregkh-2.6/fs/binfmt_elf.c	2005-05-11 00:09:17.000000000 -0700
@@ -251,7 +251,7 @@
 	}
 
 	/* Populate argv and envp */
-	p = current->mm->arg_start;
+	p = current->mm->arg_end = current->mm->arg_start;
 	while (argc-- > 0) {
 		size_t len;
 		__put_user((elf_addr_t)p, argv++);
@@ -1301,7 +1301,7 @@
 static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
 		       struct mm_struct *mm)
 {
-	int i, len;
+	unsigned int i, len;
 	
 	/* first copy the parameters from user space */
 	memset(psinfo, 0, sizeof(struct elf_prpsinfo));

_____________________________________

HTH
Wolfgang


-- 
Wolfgang Pfeiffer
http://profiles.yahoo.com/wolfgangpfeiffer



Reply to: