lkml.org 
[lkml]   [2006]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Mapping to 0x0
    Jan Engelhardt wrote:
    > The mmap() usually succeeds and maps something at address 0x00000000. Now
    > what if the kernel would try to execute this (of course badly programmed)
    > code in the context of this very process?
    >
    > int (*callback)(int xyz) = NULL;
    > callback();
    >
    > Would not be the badcode be executed with kernel privileges?

    I'm not sure, but I would suspect it might, yes, at least on some
    platforms and configurations. However, this unlikely to be a serious
    problem, since any kernel code that executed a callback method which
    could be a NULL without checking for that would blow up the system in
    the vast majority of cases where nothing was mapped at address 0.

    --
    Robert Hancock Saskatoon, SK, Canada
    To email, remove "nospam" from hancockr@nospamshaw.ca
    Home Page: http://www.roberthancock.com/

    -
    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-24 03:21    [W:0.021 / U:1.700 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site