linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] binfmt_elf: get_user() called in vma_dump_size() after set_fs(KERNEL_DS)
@ 2009-02-06 17:10 Gerald Schaefer
  2009-02-06 21:44 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Gerald Schaefer @ 2009-02-06 17:10 UTC (permalink / raw)
  To: Roland McGrath
  Cc: linux-kernel, Martin Schwidefsky, Heiko Carstens, Andrew Morton,
	Linus Torvalds

Hi,

elf_core_dump() does a set_fs(KERNEL_DS) and then calls vma_dump_size(),
which uses get_user() to check for an ELF header at vma->vm_start in the
user mapping. This is a bug because vm_start is a user virtual address and
get_user() will fail or even read from a kernel address (KERNEL_DS).

Maybe a get_user_pages() should be used to get the user data, or a temporary
set_fs(USER_DS)?

--
Gerald



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

end of thread, other threads:[~2009-02-07  1:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-06 17:10 [BUG] binfmt_elf: get_user() called in vma_dump_size() after set_fs(KERNEL_DS) Gerald Schaefer
2009-02-06 21:44 ` Andrew Morton
2009-02-06 21:57   ` Linus Torvalds
2009-02-06 22:07   ` Roland McGrath
2009-02-06 22:18     ` David Miller
2009-02-06 22:19     ` Linus Torvalds
2009-02-07  1:55       ` [PATCH] elf core dump: fix get_user use Roland McGrath
2009-02-07  1:55       ` [BUG] binfmt_elf: get_user() called in vma_dump_size() after set_fs(KERNEL_DS) Roland McGrath

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).