From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH/2.4.26] Avoid kernel data corruption through /dev/kmem
Date: Sat, 3 Jul 2004 20:13:45 +0200 [thread overview]
Message-ID: <200407032013.45234.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <20040702131844.GC7679@logos.cnet>
Alle 15:18, venerdì 2 luglio 2004, Marcelo Tosatti ha scritto:
> On Thu, Jul 01, 2004 at 04:05:29PM +0200, BlaisorBlade wrote:
> This looks much better for inclusion. But do you actually have a problem
> with write to /dev/kmem not returning correct error code?
The *other* time I spoke about error code... but it seems you don't have
noticed the part *below* of my mail, the one where I describe what I complain
about kernel memory corruption... read below:
> If you convince me there are good enough reasons we can try this on
> 2.4.28-pre.
> > We need to check if do_write_mem == -EFAULT.
> > In fact, without that check, we could execute this:
> >
> > do_write_mem returns -EFAULT;
> > wrote = -EFAULT;
> >
> > buf += wrote; //i.e. buf -= EFAULT (14);
> >
> > ... read other data from buf, and write it to kernel memory
And those datas are crap, obviously: the app wanted to write *buf to kernel
memory, not *(buf-14), so we can have data corruption.
> > (actually on special circumstances, i.e. p < high_memory &&
> > p + count > high_memory).
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
prev parent reply other threads:[~2004-07-03 17:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-01 14:05 BlaisorBlade
2004-07-02 13:18 ` Marcelo Tosatti
2004-07-03 18:13 ` BlaisorBlade [this message]
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=200407032013.45234.blaisorblade_spam@yahoo.it \
--to=blaisorblade_spam@yahoo.it \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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
all inboxes | Powered by JetHome®