Page 1 of 1

UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Tue Jan 26, 2010 1:21 pm
by Grach
There is a bug in 2.6.32.6-grsec-201001251756 that causes panic at boot:
Code: Select all
VFS: mounted filesystem with journal data mode
Freeing unused kernel memory: 428k freed
Kernel panic - not syncing. No init found. Try passing init= option to kernel.
Pid: 1, comm: swapper Not tainted 2.6.32.6-grsec-201001251756 #12
Call trace:
 [<005816d8>] ? printk+0x18/0x1a
 [<00581613>] panic+0x43/0xf0
 [<00002289>] per_cpu__core_domains+0x9/0x58
 [<00a0539f>] 0xa0539f
 [<00a05215>] ? 0xa05215
 [<000285f7>] kernel_thread_helper+0x7/0x10


To trigger the bug it's enough to enable CONFIG_PAX_MEMORY_UDEREF. My config is:
Code: Select all
# cat /boot/config-2.6.32.6-grsec-201001251756 | gzip -9c | base64
H4sIAGghX0sCA4w8XXPbtrLv/RUa987cex5aW7KtOJ3xAwiCEiqCoAFQlvKCcRwl0RzHyrHlnuTf
3wVISgAJUOlMk3B38bVY7BcW+v2330fobb/79rDfPj48Pf0cfdk8b14e9ptPo28P/96MHnfPn7df
/hp92j3/7360+bTdQ4t8+/z2Y/Tvzcvz5mn0z+bldbt7/ms0+XP65yX8AQTqbTP6++F5NJmOxjd/
Xbz/a3w1mlyML377HZCYFxmd6elVQtVo+zp63u1Hr5v9bw18dTPVl5Pbn0dKA5lehUmBrvnglSor
pTMuGFK3Z5unz5eTP7aXN9OzlgIJPNcpyerP27OHl8ev5z9upuf1Il/PDbX+tPlcfx/azUhBBMVa
UUaO47VQzLjUVZki5SBxzvFC8kpgou+RwvOUzwJNDRVZkkLJQaROBEcpRlIdyQw2JaWWVVly4SCk
QnihBIKRe7g5WhKdw0wLvFY80Jix6vjxgRdEpwz150YliiA4Q2UfnFSB1c/vCZ3NncHt/jC0rqdZ
Yp2l2JUDcS8JOzSXJS0MEwJyUROu8HyG0lSjfMYFVXPWGWmOpMZlpWmam02iKrAHKKeJAH6B2ORo
7U7GFQq9l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kbJAScEiDL
lwNDt7KL40HnA1BumaG6hQfDIBi+Bh7M2pzIfo6C1Oh6L6oNVIoIFVVDZvgxpusaM4NBhTrxsg8d
gIUJMWcFLCe8vcO3o2ekb3+f9qfv2Umqo2/vQ0EcMHmMhiCPw0Ng67IO9ydgRhFVoxOIuvA5mO1w
dErGX0tpLPc5VpkgMx4t0FTzm4jFTnktZXlVN2YBt4tRAW6HHTmJ9XbgKBhmOFifzemvoNaikBNf
5XE1IycBNKI2HG4rBIXJ5oI1m6HKM4AHmRMcC2P6C7BpUAs0tjFCJiEy9B1q3+H8H9e9L+p47AAA

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Tue Jan 26, 2010 3:50 pm
by PaX Team
Grach wrote:There is a bug in 2.6.32.6-grsec-201001251756 that causes panic at boot:
can you please try to reproduce it with the latest PaX test patch alone and also follow http://en.wikibooks.org/wiki/Grsecurity/Reporting_Bugs when reporting such bugs?

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Wed Jan 27, 2010 3:30 am
by jdoe
I'm having the same problem. I've emailed you with more details, unfortunately I couldn't compile with the latest pax test patch.. but hopefully it's still useful.

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Wed Jan 27, 2010 4:51 am
by PaX Team
jdoe wrote:I'm having the same problem. I've emailed you with more details
thanks, got it. can you test it without UDEREF (or any PaX feature if that still fails)?
unfortunately I couldn't compile with the latest pax test patch.
when moving a grsec config to PaX, you must set the ACL hook option accordingly ('none').

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Wed Jan 27, 2010 1:56 pm
by jdoe
Boots with no obvious issues with UDEREF disabled. Crashes before init with UDEREF enabled, details emailed.

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Wed Jan 27, 2010 8:59 pm
by PaX Team
jdoe wrote:Boots with no obvious issues with UDEREF disabled. Crashes before init with UDEREF enabled, details emailed.
thanks, so it seems that for whatever reason init cannot be executed. can i ask you guys to instrument load_elf_binary in fs/binfmt_elf.c and add a printk to every error exit path so we know at which point it fails?

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Wed Jan 27, 2010 9:27 pm
by jdoe
Unfortunately this is a remote machine I don't have reliable console access to. Hopefully Grach can help with that.

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Wed Jan 27, 2010 10:26 pm
by Grach
Yes, I'll do it today, a bit later.

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Thu Jan 28, 2010 11:36 am
by Grach
Seems like load_elf_binary wasn't called at all. I've got no output even from the first printk:
Code: Select all
static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
{   printk("enter load_elf_binary\n");
   struct file *interpreter = NULL; /* to shut gcc up */
    unsigned long load_addr = 0, load_bias = 0;
   int load_addr_set = 0;
   char * elf_interpreter = NULL;
   unsigned long error = 0;
   struct elf_phdr *elf_ppnt, *elf_phdata;
   unsigned long elf_bss, elf_brk;
   int retval, i;
   unsigned int size;
   unsigned long elf_entry;
   unsigned long interp_load_addr = 0;
   unsigned long start_code, end_code, start_data, end_data;
   unsigned long reloc_func_desc = 0;
   int executable_stack = EXSTACK_DEFAULT;
   struct {
      struct elfhdr elf_ex;
      struct elfhdr interp_elf_ex;
   } *loc;
   unsigned long pax_task_size = TASK_SIZE;

   loc = kmalloc(sizeof(*loc), GFP_KERNEL);
   if (!loc) {
      printk("!783\n");
      retval = -ENOMEM;
      goto out_ret;
   }
   
   /* Get the exec-header */
   loc->elf_ex = *((struct elfhdr *)bprm->buf);

   retval = -ENOEXEC;
   /* First of all, some simple consistency checks */
   if (memcmp(loc->elf_ex.e_ident, ELFMAG, SELFMAG) != 0) {
      printk("!794\n");
      goto out;
   }

   if (loc->elf_ex.e_type != ET_EXEC && loc->elf_ex.e_type != ET_DYN) {
      printk("!799\n");
      goto out;
   }
   if (!elf_check_arch(&loc->elf_ex)) {
      printk("!803\n");
      goto out;
   }
   if (!bprm->file->f_op||!bprm->file->f_op->mmap) {
      printk("!807\n");
      goto out;
   }

   /* Now read in all of the header information */
   if (loc->elf_ex.e_phentsize != sizeof(struct elf_phdr)) {
      printk("!813\n");
      goto out;
   }
   if (loc->elf_ex.e_phnum < 1 ||
       loc->elf_ex.e_phnum > 65536U / sizeof(struct elf_phdr)) {
      printk("!818\n");
      goto out;
   }
   size = loc->elf_ex.e_phnum * sizeof(struct elf_phdr);
   retval = -ENOMEM;
   printk("?823\n");
   elf_phdata = kmalloc(size, GFP_KERNEL);
   if (!elf_phdata) {
      printk("!826\n");
      goto out;
   }

   retval = kernel_read(bprm->file, loc->elf_ex.e_phoff,
              (char *)elf_phdata, size);
   if (retval != size) {
      if (retval >= 0) {
         printk("?834\n");
         retval = -EIO;
      }
      printk("!837\n");
      goto out_free_ph;
   }

   elf_ppnt = elf_phdata;
   elf_bss = 0;
   elf_brk = 0;

   start_code = ~0UL;
   end_code = 0;
   start_data = 0;
   end_data = 0;

   for (i = 0; i < loc->elf_ex.e_phnum; i++) {
      if (elf_ppnt->p_type == PT_INTERP) {
         /* This is the program interpreter used for
          * shared libraries - for now assume that this
          * is an a.out format binary
          */
         retval = -ENOEXEC;
         if (elf_ppnt->p_filesz > PATH_MAX ||
             elf_ppnt->p_filesz < 2) {
            printk("!859\n");
            goto out_free_ph;
         }

         retval = -ENOMEM;
         elf_interpreter = kmalloc(elf_ppnt->p_filesz,
                    GFP_KERNEL);
         if (!elf_interpreter) {
            printk("!867\n");
            goto out_free_ph;
         }

         retval = kernel_read(bprm->file, elf_ppnt->p_offset,
                    elf_interpreter,
                    elf_ppnt->p_filesz);
         if (retval != elf_ppnt->p_filesz) {
            if (retval >= 0) {
               printk("?876\n");
               retval = -EIO;
            }
            printk("!879\n");
            goto out_free_interp;
         }
         /* make sure path is NULL terminated */
         retval = -ENOEXEC;
         if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0') {
            printk("!885\n");
            goto out_free_interp;
         }

         /*
          * The early SET_PERSONALITY here is so that the lookup
          * for the interpreter happens in the namespace of the
          * to-be-execed image.  SET_PERSONALITY can select an
          * alternate root.
          *
          * However, SET_PERSONALITY is NOT allowed to switch
          * this task into the new images's memory mapping
          * policy - that is, TASK_SIZE must still evaluate to
          * that which is appropriate to the execing application.
          * This is because exit_mmap() needs to have TASK_SIZE
          * evaluate to the size of the old image.
          *
          * So if (say) a 64-bit application is execing a 32-bit
          * application it is the architecture's responsibility
          * to defer changing the value of TASK_SIZE until the
          * switch really is going to happen - do this in
          * flush_thread().   - akpm
          */
         SET_PERSONALITY(loc->elf_ex);

         interpreter = open_exec(elf_interpreter);
         retval = PTR_ERR(interpreter);
         if (IS_ERR(interpreter)) {
            printk("!913\n");
            goto out_free_interp;
         }

         /*
          * If the binary is not readable then enforce
          * mm->dumpable = 0 regardless of the interpreter's
          * permissions.
          */
         if (file_permission(interpreter, MAY_READ) < 0)
            bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;

         retval = kernel_read(interpreter, 0, bprm->buf,
                    BINPRM_BUF_SIZE);
         if (retval != BINPRM_BUF_SIZE) {
            if (retval >= 0) {
               printk("?929\n");
               retval = -EIO;
            }
            printk("!932\n");
            goto out_free_dentry;
         }

         /* Get the exec headers */
         loc->interp_elf_ex = *((struct elfhdr *)bprm->buf);
         break;
      }
      elf_ppnt++;
   }

   elf_ppnt = elf_phdata;
   for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++)
      if (elf_ppnt->p_type == PT_GNU_STACK) {
         if (elf_ppnt->p_flags & PF_X)
            executable_stack = EXSTACK_ENABLE_X;
         else
            executable_stack = EXSTACK_DISABLE_X;
         break;
      }

   /* Some simple consistency checks for the interpreter */
   if (elf_interpreter) {
      retval = -ELIBBAD;
      /* Not an ELF interpreter */
      if (memcmp(loc->interp_elf_ex.e_ident, ELFMAG, SELFMAG) != 0) {
         printk("!958\n");
         goto out_free_dentry;
      }
      /* Verify the interpreter has a valid arch */
      if (!elf_check_arch(&loc->interp_elf_ex)) {
         printk("!963\n");
         goto out_free_dentry;
      }
   } else {
      /* Executables without an interpreter also need a personality  */
      SET_PERSONALITY(loc->elf_ex);
   }

   /* Flush all traces of the currently running executable */
   retval = flush_old_exec(bprm);
   if (retval) {
      printk("!974\n");
      goto out_free_dentry;
   }

   /* OK, This is the point of no return */
   current->flags &= ~PF_FORKNOEXEC;

#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR)
   current->mm->pax_flags = 0UL;
#endif

#ifdef CONFIG_PAX_DLRESOLVE
   current->mm->call_dl_resolve = 0UL;
#endif

#if defined(CONFIG_PPC32) && defined(CONFIG_PAX_EMUSIGRT)
   current->mm->call_syscall = 0UL;
#endif

#ifdef CONFIG_PAX_ASLR
   current->mm->delta_mmap = 0UL;
   current->mm->delta_stack = 0UL;
#endif

   current->mm->def_flags = 0;

#if defined(CONFIG_PAX_EI_PAX) || defined(CONFIG_PAX_PT_PAX_FLAGS)
   if (0 > pax_parse_elf_flags(&loc->elf_ex, elf_phdata)) {
      send_sig(SIGKILL, current, 0);
      printk("!1003\n");
      goto out_free_dentry;
   }
#endif

#ifdef CONFIG_PAX_HAVE_ACL_FLAGS
   pax_set_initial_flags(bprm);
#elif defined(CONFIG_PAX_HOOK_ACL_FLAGS)
   if (pax_set_initial_flags_func)
      (pax_set_initial_flags_func)(bprm);
#endif

#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
   if ((current->mm->pax_flags & MF_PAX_PAGEEXEC) && !nx_enabled) {
      current->mm->context.user_cs_limit = PAGE_SIZE;
      current->mm->def_flags |= VM_PAGEEXEC;
   }
#endif

#ifdef CONFIG_PAX_SEGMEXEC
   if (current->mm->pax_flags & MF_PAX_SEGMEXEC) {
      current->mm->context.user_cs_base = SEGMEXEC_TASK_SIZE;
      current->mm->context.user_cs_limit = TASK_SIZE-SEGMEXEC_TASK_SIZE;
      pax_task_size = SEGMEXEC_TASK_SIZE;
   }
#endif

#if defined(CONFIG_ARCH_TRACK_EXEC_LIMIT) || defined(CONFIG_PAX_SEGMEXEC)
   if (current->mm->pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) {
      set_user_cs(current->mm->context.user_cs_base, current->mm->context.user_cs_limit, get_cpu());
      put_cpu();
   }
#endif

#ifdef CONFIG_PAX_ASLR
   if (current->mm->pax_flags & MF_PAX_RANDMMAP) {
      current->mm->delta_mmap = (pax_get_random_long() & ((1UL << PAX_DELTA_MMAP_LEN)-1)) << PAGE_SHIFT;
      current->mm->delta_stack = (pax_get_random_long() & ((1UL << PAX_DELTA_STACK_LEN)-1)) << PAGE_SHIFT;
   }
#endif

   /* Do this immediately, since STACK_TOP as used in setup_arg_pages
      may depend on the personality.  */
   SET_PERSONALITY(loc->elf_ex);

#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
   if (current->mm->pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) {
      executable_stack = EXSTACK_DISABLE_X;
      current->personality &= ~READ_IMPLIES_EXEC;
   } else
#endif

   if (elf_read_implies_exec(loc->elf_ex, executable_stack))
      current->personality |= READ_IMPLIES_EXEC;

   if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
      current->flags |= PF_RANDOMIZE;
   arch_pick_mmap_layout(current->mm);

   /* Do this so that we can load the interpreter, if need be.  We will
      change some of these later */
   current->mm->free_area_cache = current->mm->mmap_base;
   current->mm->cached_hole_size = 0;
   retval = setup_arg_pages(bprm, randomize_stack_top(STACK_TOP),
             executable_stack);
   if (retval < 0) {
      send_sig(SIGKILL, current, 0);
      printk("!1070\n");
      goto out_free_dentry;
   }
   
   current->mm->start_stack = bprm->p;

   /* Now we do a little grungy work by mmaping the ELF image into
      the correct location in memory. */
   for(i = 0, elf_ppnt = elf_phdata;
       i < loc->elf_ex.e_phnum; i++, elf_ppnt++) {
      int elf_prot = 0, elf_flags;
      unsigned long k, vaddr;

      if (elf_ppnt->p_type != PT_LOAD)
         continue;

      if (unlikely (elf_brk > elf_bss)) {
         unsigned long nbyte;
              
         /* There was a PT_LOAD segment with p_memsz > p_filesz
            before this one. Map anonymous pages, if needed,
            and clear the area.  */
         retval = set_brk (elf_bss + load_bias,
                 elf_brk + load_bias);
         if (retval) {
            send_sig(SIGKILL, current, 0);
            printk("!1096\n");
            goto out_free_dentry;
         }
         nbyte = ELF_PAGEOFFSET(elf_bss);
         if (nbyte) {
            nbyte = ELF_MIN_ALIGN - nbyte;
            if (nbyte > elf_brk - elf_bss)
               nbyte = elf_brk - elf_bss;
            if (clear_user((void __user *)elf_bss +
                     load_bias, nbyte)) {
               /*
                * This bss-zeroing can fail if the ELF
                * file specifies odd protections. So
                * we don't check the return value
                */
            }
         }
      }

      if (elf_ppnt->p_flags & PF_R)
         elf_prot |= PROT_READ;
      if (elf_ppnt->p_flags & PF_W)
         elf_prot |= PROT_WRITE;
      if (elf_ppnt->p_flags & PF_X)
         elf_prot |= PROT_EXEC;

      elf_flags = MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE;

      vaddr = elf_ppnt->p_vaddr;
      if (loc->elf_ex.e_type == ET_EXEC || load_addr_set) {
         elf_flags |= MAP_FIXED;
      } else if (loc->elf_ex.e_type == ET_DYN) {
         /* Try and get dynamic programs out of the way of the
          * default mmap base, as well as whatever program they
          * might try to exec.  This is because the brk will
          * follow the loader, and is not movable.  */
#ifdef CONFIG_X86
         load_bias = 0;
#else
         load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
#endif

#ifdef CONFIG_PAX_RANDMMAP
         /* PaX: randomize base address at the default exe base if requested */
         if ((current->mm->pax_flags & MF_PAX_RANDMMAP) && elf_interpreter) {
#ifdef CONFIG_SPARC64
            load_bias = (pax_get_random_long() & ((1UL << PAX_DELTA_MMAP_LEN) - 1)) << (PAGE_SHIFT+1);
#else
            load_bias = (pax_get_random_long() & ((1UL << PAX_DELTA_MMAP_LEN) - 1)) << PAGE_SHIFT;
#endif
            load_bias = ELF_PAGESTART(PAX_ELF_ET_DYN_BASE - vaddr + load_bias);
            elf_flags |= MAP_FIXED;
         }
#endif

      }

      error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
            elf_prot, elf_flags, 0);
      if (BAD_ADDR(error)) {
         send_sig(SIGKILL, current, 0);
         retval = IS_ERR((void *)error) ?
            PTR_ERR((void*)error) : -EINVAL;
         printk("!1159\n");
         goto out_free_dentry;
      }

      if (!load_addr_set) {
         load_addr_set = 1;
         load_addr = (elf_ppnt->p_vaddr - elf_ppnt->p_offset);
         if (loc->elf_ex.e_type == ET_DYN) {
            load_bias += error -
                         ELF_PAGESTART(load_bias + vaddr);
            load_addr += load_bias;
            reloc_func_desc = load_bias;
         }
      }
      k = elf_ppnt->p_vaddr;
      if (k < start_code)
         start_code = k;
      if (start_data < k)
         start_data = k;

      /*
       * Check to see if the section's size will overflow the
       * allowed task size. Note that p_filesz must always be
       * <= p_memsz so it is only necessary to check p_memsz.
       */
      if (k >= pax_task_size || elf_ppnt->p_filesz > elf_ppnt->p_memsz ||
          elf_ppnt->p_memsz > pax_task_size ||
          pax_task_size - elf_ppnt->p_memsz < k) {
         /* set_brk can never work. Avoid overflows. */
         send_sig(SIGKILL, current, 0);
         retval = -EINVAL;
         printk("!1190\n");
         goto out_free_dentry;
      }

      k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz;

      if (k > elf_bss)
         elf_bss = k;
      if ((elf_ppnt->p_flags & PF_X) && end_code < k)
         end_code = k;
      if (end_data < k)
         end_data = k;
      k = elf_ppnt->p_vaddr + elf_ppnt->p_memsz;
      if (k > elf_brk)
         elf_brk = k;
   }

   loc->elf_ex.e_entry += load_bias;
   elf_bss += load_bias;
   elf_brk += load_bias;
   start_code += load_bias;
   end_code += load_bias;
   start_data += load_bias;
   end_data += load_bias;

#ifdef CONFIG_PAX_RANDMMAP
   if (current->mm->pax_flags & MF_PAX_RANDMMAP)
      elf_brk += PAGE_SIZE + ((pax_get_random_long() & ~PAGE_MASK) << 4);
#endif

   /* Calling set_brk effectively mmaps the pages that we need
    * for the bss and break sections.  We must do this before
    * mapping in the interpreter, to make sure it doesn't wind
    * up getting placed where the bss needs to go.
    */
   retval = set_brk(elf_bss, elf_brk);
   if (retval) {
      send_sig(SIGKILL, current, 0);
      printk("!1228\n");
      goto out_free_dentry;
   }
   if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
      /*
       * This bss-zeroing can fail if the ELF
       * file specifies odd protections. So
       * we don't check the return value
       */
   }

   if (elf_interpreter) {
      unsigned long uninitialized_var(interp_map_addr);

      elf_entry = load_elf_interp(&loc->interp_elf_ex,
                   interpreter,
                   &interp_map_addr,
                   load_bias);
      if (!IS_ERR((void *)elf_entry)) {
         /*
          * load_elf_interp() returns relocation
          * adjustment
          */
         interp_load_addr = elf_entry;
         elf_entry += loc->interp_elf_ex.e_entry;
      }
      if (BAD_ADDR(elf_entry)) {
         force_sig(SIGSEGV, current);
         retval = IS_ERR((void *)elf_entry) ?
               (int)elf_entry : -EINVAL;
         printk("!1258\n");
         goto out_free_dentry;
      }
      reloc_func_desc = interp_load_addr;

      allow_write_access(interpreter);
      fput(interpreter);
      kfree(elf_interpreter);
   } else {
      elf_entry = loc->elf_ex.e_entry;
      if (BAD_ADDR(elf_entry)) {
         force_sig(SIGSEGV, current);
         retval = -EINVAL;
         printk("!1271\n");
         goto out_free_dentry;
      }
   }

   kfree(elf_phdata);

   set_binfmt(&elf_format);

#ifdef ARCH_HAS_SETUP_ADDITIONAL_PAGES
   retval = arch_setup_additional_pages(bprm, !!elf_interpreter);
   if (retval < 0) {
      send_sig(SIGKILL, current, 0);
      printk("!1284\n");
      goto out;
   }
#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */

   install_exec_creds(bprm);
   current->flags &= ~PF_FORKNOEXEC;
   retval = create_elf_tables(bprm, &loc->elf_ex,
           load_addr, interp_load_addr);
   if (retval < 0) {
      send_sig(SIGKILL, current, 0);
      printk("!1295\n");
      goto out;
   }
   /* N.B. passed_fileno might not be initialized? */
   current->mm->end_code = end_code;
   current->mm->start_code = start_code;
   current->mm->start_data = start_data;
   current->mm->end_data = end_data;
   current->mm->start_stack = bprm->p;

#ifdef arch_randomize_brk
   if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1))
      current->mm->brk = current->mm->start_brk =
         arch_randomize_brk(current->mm);
#endif

   if (current->personality & MMAP_PAGE_ZERO) {
      /* Why this, you ask???  Well SVr4 maps page 0 as read-only,
         and some applications "depend" upon this behavior.
         Since we do not have the power to recompile these, we
         emulate the SVr4 behavior. Sigh. */
      down_write(&current->mm->mmap_sem);
      error = do_mmap(NULL, 0, PAGE_SIZE, PROT_READ | PROT_EXEC,
            MAP_FIXED | MAP_PRIVATE, 0);
      up_write(&current->mm->mmap_sem);
   }

#ifdef ELF_PLAT_INIT
   /*
    * The ABI may specify that certain registers be set up in special
    * ways (on i386 %edx is the address of a DT_FINI function, for
    * example.  In addition, it may also specify (eg, PowerPC64 ELF)
    * that the e_entry field is the address of the function descriptor
    * for the startup routine, rather than the address of the startup
    * routine itself.  This macro performs whatever initialization to
    * the regs structure is required as well as any relocations to the
    * function descriptor entries when executing dynamically links apps.
    */
   ELF_PLAT_INIT(regs, reloc_func_desc);
#endif

   start_thread(regs, elf_entry, bprm->p);
   retval = 0;
out:
   kfree(loc);
out_ret:
   return retval;

   /* error cleanup */
out_free_dentry:
   allow_write_access(interpreter);
   if (interpreter)
      fput(interpreter);
out_free_interp:
   kfree(elf_interpreter);
out_free_ph:
   kfree(elf_phdata);
   printk("?1352\n");
   goto out;
}

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Thu Jan 28, 2010 12:27 pm
by PaX Team
Grach wrote:Seems like load_elf_binary wasn't called at all. I've got no output even from the first printk:
ok, then it's an earlier problem, so let's move up and instrument do_execve() in fs/exec.c please and if you find the failing function, instrument that as well until it's down to a single call to something (probably some copying code from userland).

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Thu Jan 28, 2010 1:42 pm
by ncopa
[quote="PaX Team"][quote="Grach"]Seems like load_elf_binary wasn't called at all. I've got no output even from the first printk:[/quote]ok, then it's an earlier problem, so let's move up and instrument do_execve() in fs/exec.c please and if you find the failing function, instrument that as well until it's down to a single call to something (probably some copying code from userland).[/quote]

Having same issue.

I injected a whole bunch of printk("do_exec: ...") in do_exec():
[code]
...
printk("do_execve: 4\n");
retval = check_unsafe_exec(bprm);
if (retval < 0)
goto out_free;
clear_in_exec = retval;
current->in_execve = 1;

printk("do_execve: 5\n");
file = open_exec(filename);
retval = PTR_ERR(file);
if (IS_ERR(file))
goto out_unmark;
printk("do_execve: 6\n");

sched_exec();

printk("do_execve: 7\n");
bprm->file = file;
bprm->filename = filename;
bprm->interp = filename;

gr_learn_resource(current, RLIMIT_NPROC, atomic_read(&current->cred->user->processes), 1);

printk("do_execve: 8\n");
if (gr_handle_nproc()) {
retval = -EAGAIN;
goto out_file;
}

printk("do_execve: 9\n");
if (!gr_acl_handle_execve(file->f_dentry, file->f_vfsmnt)) {
retval = -EACCES;
goto out_file;
}

printk("do_execve: 10\n");
retval = bprm_mm_init(bprm);
if (retval)
goto out_file;

printk("do_execve: 11\n");
bprm->argc = count(argv, MAX_ARG_STRINGS);
if ((retval = bprm->argc) < 0)
goto out;

printk("do_execve: 12\n");
bprm->envc = count(envp, MAX_ARG_STRINGS);
if ((retval = bprm->envc) < 0)
goto out;

printk("do_execve: 13\n");
retval = prepare_binprm(bprm);
if (retval < 0)
goto out;

printk("do_execve: 14\n");
retval = copy_strings_kernel(1, &bprm->filename, bprm);
if (retval < 0)
goto out;

printk("do_execve: 15\n");
bprm->exec = bprm->p;
retval = copy_strings(bprm->envc, envp, bprm);
if (retval < 0)
goto out;

printk("do_execve: 16\n");
retval = copy_strings(bprm->argc, argv, bprm);
if (retval < 0)
goto out;

printk("do_execve: 17\n");
if (!gr_tpe_allow(file)) {
retval = -EACCES;
goto out;
}

printk("do_execve: 18\n");
if (gr_check_crash_exec(file)) {
retval = -EACCES;
goto out;
...
out_fail:
printk("do_execve: 27\n");
#ifdef CONFIG_GRKERNSEC
current->acl = old_acl;
memcpy(current->signal->rlim, old_rlim, sizeof(old_rlim));
fput(current->exec_file);
current->exec_file = old_exec_file;
#endif

out:
printk("do_execve: 28\n");
if (bprm->mm)
mmput (bprm->mm);

out_file:
printk("do_execve: 29\n");
if (bprm->file) {
allow_write_access(bprm->file);
fput(bprm->file);
}

out_unmark:
printk("do_execve: 30\n");
if (clear_in_exec)
current->fs->in_exec = 0;
current->in_execve = 0;

out_free:
printk("do_execve: 31\n");
free_bprm(bprm);

out_files:
printk("do_execve: 32\n");
if (displaced)
reset_files_struct(displaced);
out_ret:
printk("do_execve: 33\n");
return retval;
}
...
[/code]

It prints 1-14 where it jumps to "out" and continue print 28-33.

So it looks like its this one that fails:
[code]
...
retval = copy_strings_kernel(1, &bprm->filename, bprm);
if (retval < 0)
goto out;
...
[/code]

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Thu Jan 28, 2010 3:46 pm
by PaX Team
ncopa wrote:It prints 1-14 where it jumps to "out" and continue print 28-33.

So it looks like its this one that fails:
Code: Select all
...
        retval = copy_strings_kernel(1, &bprm->filename, bprm);
        if (retval < 0)
                goto out;
...
excellent, can you please now instrument copy_strings fs/exec.c and see where it returns an error?

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Fri Jan 29, 2010 5:07 am
by ncopa
(how do i enable bbcode?)

Here's my modificated code:
[code]
...
static int copy_strings(int argc, char __user * __user * argv,
struct linux_binprm *bprm)
{
struct page *kmapped_page = NULL;
char *kaddr = NULL;
unsigned long kpos = 0;
int ret;

while (argc-- > 0) {
char __user *str;
int len = -1;
unsigned long pos;

printk("copy_strings(1): argc=%i\n", argc);
if (get_user(str, argv+argc) ||
!(len = strnlen_user(str, MAX_ARG_STRLEN))) {
printk("copy_strings(2): len=%i\n", len);
ret = -EFAULT;
goto out;
}

if (!valid_arg_len(bprm, len)) {
ret = -E2BIG;
printk("copy_strings(3): E2BIG\n");
goto out;
}
...
[/code]

It prints:
copy_string(1): argc=0
compy_string(2): len=0

Note that i modified len to initialize to -1 which means that it is the

strnlen_user(str, MAX_ARG_STRLEN)

that returns zero that triggers this.
Do you want me look in strnlen_user() as well?

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Fri Jan 29, 2010 4:53 pm
by PaX Team
ok, 32.7-test11 should have the fix, can you guys try it?

Re: UDEREF bug in 2.6.32.6-grsec-201001251756

PostPosted: Sat Jan 30, 2010 4:17 am
by Grach
grsecurity-2.1.14-2.6.32.7-201001291848.patch works for me. Thanks!