All of lore.kernel.org
 help / color / mirror / Atom feed
[parent not found: <20041028052218.52478.qmail@web50207.mail.yahoo.com>]
* BUG REPORT: User/Kernel Pointer bug in sys_poll
@ 2004-10-28  4:25 Sorav Bansal
  0 siblings, 0 replies; 7+ messages in thread
From: Sorav Bansal @ 2004-10-28  4:25 UTC (permalink / raw)
  To: linux-kernel


Package: linux-kernel-src
Version: 2.4.27

Description: User/Kernel pointer bug/security holl in sys_poll

I think, there is a potential bug/security hole in the sys_poll system
call.

In sys_poll, the user pointer ufds (first arg to sys_poll) goes through
copy_from_user. Then __put_user is called on &ufds->revents.

Since copy_from_user is a read access and __put_user is a write access,
the first call does not verify write-access to ufds. This can be exploited
by a malicious user on a 386 machine (where write-protection in
kernel mode is not enabled .i.e. CONFIG_X86_WP_WORKS_OK is undef).

It seems that this bug can be corrected by replacing the two __put_user
calls in sys_poll by put_user. I am using the latest kernel from
kernel.org .i.e. linux-2.4.27

thanks,
Sorav


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

end of thread, other threads:[~2004-10-28 20:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20041028052218.52478.qmail@web50207.mail.yahoo.com.suse.lists.linux.kernel>
     [not found] ` <Pine.GSO.4.44.0410272246240.7124-100000@elaine9.Stanford.EDU.suse.lists.linux.kernel>
2004-10-28  6:32   ` BUG REPORT: User/Kernel Pointer bug in sys_poll Andi Kleen
2004-10-28  8:50     ` Denis Vlasenko
     [not found] <20041028052218.52478.qmail@web50207.mail.yahoo.com>
2004-10-28  5:57 ` Sorav Bansal
2004-10-28  9:48   ` Andrew Morton
2004-10-28 10:04     ` Sorav Bansal
2004-10-28 19:24     ` Alan Cox
2004-10-28  4:25 Sorav Bansal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.