1. 10 Jun, 2013 1 commit
    • Kees Cook's avatar
      gen_init_cpio: avoid stack overflow when expanding · dbd3462b
      Kees Cook authored
      commit 20f1de65
      
       upstream.
      
      Fix possible overflow of the buffer used for expanding environment
      variables when building file list.
      
      In the extremely unlikely case of an attacker having control over the
      environment variables visible to gen_init_cpio, control over the
      contents of the file gen_init_cpio parses, and gen_init_cpio was built
      without compiler hardening, the attacker can gain arbitrary execution
      control via a stack buffer overflow.
      
        $ cat usr/crash.list
        file foo ${BIG}${BIG}${BIG}${BIG}${BIG}${BIG} 0755 0 0
        $ BIG=$(perl -e 'print "A" x 4096;') ./usr/gen_init_cpio usr/crash.list
        *** buffer overflow detected ***: ./usr/gen_init_cpio terminated
      
      This also replaces the space-indenting with tabs.
      
      Patch based on existing fix extracted from grsecurity.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Brad Spengler <spender@grsecurity.net>
      Cc: PaX Team <pageexec@freemail.hu>
      Si...
      dbd3462b
  2. 23 Sep, 2009 1 commit
  3. 03 Dec, 2008 1 commit
    • Sally, Gene's avatar
      kbuild: gen_init_cpio expands shell variables in file names · 3b1ec9fb
      Sally, Gene authored
      
      Modify gen_init_cpio so that lines that specify files can contain
      what looks like a shell variable that's expanded during processing.
      
      For example:
      
         file /sbin/kinit ${RFS_BASE}/usr/src/klibc/kinit/kinit 0755 0 0
      
      given RFS_BASE is "/some/directory" in the environment
      
      would be expanded to
      
         file /sbin/kinit /some/directory/usr/src/klibc/kinit/kinit 0755 0 0
      
      If several environment variables appear in a line, they are all expanded
      with processing happening from left to right.
      Undefined variables expand to a null string.
      Syntax errors stop processing, letting the existing error handling
      show the user offending line.
      
      This patch helps embedded folks who frequently create several
      RFS directories and then switch between them as they're tuning
      an initramfs.
      
      Signed-off-by: gene.sally@timesys.com
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      3b1ec9fb
  4. 16 Jul, 2007 1 commit
  5. 11 Feb, 2007 1 commit
  6. 19 Apr, 2006 1 commit
  7. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4