]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] fix Linux kernel ELF core dump privilege elevation
authorgregkh@suse.de <gregkh@suse.de>
Wed, 11 May 2005 22:29:30 +0000 (15:29 -0700)
committerGreg KH <gregkh@suse.de>
Thu, 12 May 2005 17:00:25 +0000 (10:00 -0700)
As reported by Paul Starzetz <ihaquer@isec.pl>

Reference: CAN-2005-1263

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/binfmt_elf.c

index bfb61679080dbecac547955e679c1df2be450c41..24f6ea075cf2a03db84b9fb30c704dc54582b7ab 100644 (file)
@@ -257,7 +257,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr * exec,
        }
 
        /* 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++);
@@ -1279,7 +1279,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
 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));