[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081203143307.GA2068@ucw.cz>
Date: Wed, 3 Dec 2008 15:33:08 +0100
From: Pavel Machek <pavel@...e.cz>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Chris Wright <chrisw@...hat.com>, Izik Eidus <ieidus@...hat.com>,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, kvm@...r.kernel.org, aarcange@...hat.com,
avi@...hat.com, dlaor@...hat.com, kamezawa.hiroyu@...fujitsu.com,
cl@...ux-foundation.org, corbet@....net
Subject: Re: [PATCH 3/4] add ksm kernel shared memory driver.
On Tue 2008-12-02 22:10:29, Alan Cox wrote:
> On Tue, 2 Dec 2008 13:24:11 -0800
> Chris Wright <chrisw@...hat.com> wrote:
>
> > * Alan Cox (alan@...rguk.ukuu.org.uk) wrote:
> > > On Tue, 2 Dec 2008 10:07:24 -0800
> > > Chris Wright <chrisw@...hat.com> wrote:
> > > > * Alan Cox (alan@...rguk.ukuu.org.uk) wrote:
> > > > > > + r = !memcmp(old_digest, sha1_item->sha1val, SHA1_DIGEST_SIZE);
> > > > > > + mutex_unlock(&sha1_lock);
> > > > > > + if (r) {
> > > > > > + char *old_addr, *new_addr;
> > > > > > + old_addr = kmap_atomic(oldpage, KM_USER0);
> > > > > > + new_addr = kmap_atomic(newpage, KM_USER1);
> > > > > > + r = !memcmp(old_addr+PAGEHASH_LEN, new_addr+PAGEHASH_LEN,
> > > > > > + PAGE_SIZE-PAGEHASH_LEN);
> > > > >
> > > > > NAK - this isn't guaranteed to be robust so you could end up merging
> > > > > different pages one provided by a malicious attacker.
> > > >
> > > > I presume you're referring to the digest comparison. While there's
> > > > theoretical concern of hash collision, it's mitigated by hmac(sha1)
> > > > so the attacker can't brute force for known collisions.
> > >
> > > Using current known techniques. A random collision is just as bad news.
> >
> > And, just to clarify, your concern would extend to any digest based
> > comparison? Or are you specifically concerned about sha1?
>
> Taken off list
Hmmm, list would like to know :-).
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists