From: Robert Hancock <hancockr@shaw.ca>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Mapping to 0x0
Date: Thu, 23 Feb 2006 20:17:33 -0600 [thread overview]
Message-ID: <43FE6CBD.50607@shaw.ca> (raw)
In-Reply-To: <5J30B-8wi-7@gated-at.bofh.it>
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/
next parent reply other threads:[~2006-02-24 2:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5J30B-8wi-7@gated-at.bofh.it>
2006-02-24 2:17 ` Robert Hancock [this message]
2006-02-22 14:10 Mapping to 0x0 Jan Engelhardt
2006-02-22 14:31 ` linux-os (Dick Johnson)
2006-02-23 17:14 ` Jan Engelhardt
2006-02-23 17:45 ` linux-os (Dick Johnson)
2006-02-24 11:37 ` Michael Buesch
2006-02-25 18:25 ` Kyle Moffett
2006-02-25 22:10 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43FE6CBD.50607@shaw.ca \
--to=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox