public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [CHECKER] pcmcia user-pointer dereference
@ 2003-05-29 21:11 Hollis Blanchard
  2003-05-29 21:22 ` David Hinds
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Hollis Blanchard @ 2003-05-29 21:11 UTC (permalink / raw)
  To: linux-kernel, Junfeng Yang; +Cc: David Hinds

On Mon, 12 May 2003 Junfeng wrote:
>
> here is a detailed explanation in case the warnning itself isn't clear:
>
> 1. ds_ioctl is assigned to file_operantions.ioctl
> so its argument 'arg' is tainted. verify_area are
> also called on 'arg', which confirms.
>
> 2. copy_from_user (&buf, arg, _) copies in the content of arg
>
> 3. buf.win_info.handle is thus a user provided pointer.
>
> 4. pcmcia_get_mem_page dereferences its first parameter, in this case
> buf.win_info.handle

I contacted David Hinds about this; the behavior is by design. User 
space passes in a pointer to a kernel data structure, and the kernel 
verifies it by checking a magic number in that structure.

It seems possible to perform some activity from user space to get the 
magic number into (any) kernel memory, then iterate over kernel space 
by passing pointers to the pcmcia ds_ioctl() until you manage to 
corrupt something. But I'm not really a security guy...

-- 
Hollis Blanchard
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <E19LjBL-0000FS-00@mrrp.telinco.co.uk>]

end of thread, other threads:[~2003-05-31 22:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-29 21:11 [CHECKER] pcmcia user-pointer dereference Hollis Blanchard
2003-05-29 21:22 ` David Hinds
2003-05-29 21:30   ` Hollis Blanchard
2003-05-29 21:36     ` David Hinds
2003-05-30 10:11       ` Alan Cox
2003-05-30 10:10 ` Alan Cox
2003-05-31 22:46 ` David Wagner
     [not found] <E19LjBL-0000FS-00@mrrp.telinco.co.uk>
2003-05-30 12:43 ` Mike Playle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox