linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* DoS on x86_64
@ 2010-01-28  7:34 Mathias Krause
  2010-01-28  8:18 ` [Security] " Andrew Morton
  2010-01-28 17:10 ` Linus Torvalds
  0 siblings, 2 replies; 32+ messages in thread
From: Mathias Krause @ 2010-01-28  7:34 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, linux-mm; +Cc: security


[-- Attachment #1.1: Type: text/plain, Size: 1548 bytes --]

Hello security team,

I found by accident an reliable way to panic the kernel on an x86_64  
system. Since this one can be triggered by an unprivileged user I  
CCed security@kernel.org. I also haven't found a corresponding bug on  
bugzilla.kernel.org. So, what to do to trigger the bug:

1. Enable core dumps
2. Start an 32 bit program that tries to execve() an 64 bit program
3. The 64 bit program cannot be started by the kernel because it  
can't find the interpreter, i.e. execve returns with an error
4. Generate a segmentation fault
5. panic

The problem seams to be located in fs/binfmt_elf.c:load_elf_binary().  
It calls SET_PERSONALITY() prior checking that the ELF interpreter is  
available. This in turn makes the previously 32 bit process a 64 bit  
one which would be fine if execve() would succeed. But after the  
SET_PERSONALITY() the open_exec() call fails (because it cannot find  
the interpreter) and execve() almost instantly returns with an error.  
If you now look at /proc/PID/maps you'll see, that it has the  
vsyscall page mapped which shouldn't be. But the process is not dead  
yet, it's still running. By now generating a segmentation fault and  
in turn trying to generate a core dump the kernel just dies. I  
haven't yet looked into this code but maybe you guys are much faster  
than me and just can fix this problem :)

Test case for this bug is attached. It was tested on a 2.6.26.7 and  
2.6.30.10, but I may affect even older kernels. So it may be  
interesting for stable, too.


Greetings,
Mathias Krause

[-- Attachment #1.2: amd64_killer.tgz --]
[-- Type: application/octet-stream, Size: 796 bytes --]

[-- Attachment #2: Signierter Teil der Nachricht --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2010-01-29  6:23 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28  7:34 DoS on x86_64 Mathias Krause
2010-01-28  8:18 ` [Security] " Andrew Morton
2010-01-28 15:41   ` H. Peter Anvin
2010-01-28 22:33     ` Linus Torvalds
2010-01-28 22:47       ` Mathias Krause
2010-01-28 22:47       ` H. Peter Anvin
2010-01-28 23:09         ` Linus Torvalds
2010-01-28 23:27           ` H. Peter Anvin
2010-01-28 23:46             ` Linus Torvalds
2010-01-29  4:43             ` Linus Torvalds
2010-01-29  4:43               ` [PATCH 1/2] Split 'flush_old_exec' into two functions Linus Torvalds
2010-01-29  4:47                 ` [PATCH 2/2] x86: get rid of the insane TIF_ABI_PENDING bit Linus Torvalds
2010-01-29  5:17                 ` [PATCH 1/2] Split 'flush_old_exec' into two functions H. Peter Anvin
2010-01-29  5:05               ` [Security] DoS on x86_64 H. Peter Anvin
2010-01-29  5:29               ` H. Peter Anvin
2010-01-29  5:34                 ` [PATCH 1/2] Split 'flush_old_exec' into two functions H. Peter Anvin
2010-01-29  5:34                   ` [PATCH 2/2] x86: get rid of the insane TIF_ABI_PENDING bit H. Peter Anvin
2010-01-29  5:36                 ` [PATCH 1/2] Split 'flush_old_exec' into two functions H. Peter Anvin
2010-01-29  5:36                   ` [PATCH 2/2] x86: get rid of the insane TIF_ABI_PENDING bit H. Peter Anvin
2010-01-29  5:41                 ` [PATCH 1/2] Split 'flush_old_exec' into two functions H. Peter Anvin
2010-01-29  5:41                   ` [PATCH 2/2] x86: get rid of the insane TIF_ABI_PENDING bit H. Peter Anvin
2010-01-29  5:44                     ` H. Peter Anvin
2010-01-29  6:14                 ` [PATCH 1/2] Split 'flush_old_exec' into two functions H. Peter Anvin
2010-01-29  6:14                 ` [PATCH 2/2] x86: get rid of the insane TIF_ABI_PENDING bit H. Peter Anvin
2010-01-28 23:06       ` [Security] DoS on x86_64 Linus Torvalds
2010-01-28 23:14         ` H. Peter Anvin
2010-01-28 21:31   ` Mathias Krause
2010-01-28 17:10 ` Linus Torvalds
2010-01-28 21:49   ` Mathias Krause
2010-01-28 21:58     ` Linus Torvalds
2010-01-28 22:08       ` Mathias Krause
2010-01-28 22:18         ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).