lkml.org 
[lkml]   [2006]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Mapping to 0x0
>> I am playing around with it. I did the attached code. It is a usermode
>> program, which tries to map NULL, and a kernel module, which calls a NULL
>> pointer. The file badcode.bin contains an i386 ud2 instruction. When
>> loading the kernel module, while the usermode program is executing, I get
>> the usual NULL pointer dereference oops:
>
> You need to trigger the null pointer dereference from within the userspace
> program that maps NULL. The reason your test doesn't do anything is that it is
> the insmod tool whose address space gets used, as opposed to your nulltest
> program.
>

Think of a device driver which dereferences on read() or write() or ioctl.
Then the userspace program gets its chance, does not it?



Jan Engelhardt
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-25 23:13    [W:0.606 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site