lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Nov 2008 16:58:06 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Izik Eidus <ieidus@...hat.com>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, kvm@...r.kernel.org, aarcange@...hat.com,
	chrisw@...hat.com, avi@...hat.com, dlaor@...hat.com,
	kamezawa.hiroyu@...fujitsu.com, cl@...ux-foundation.org,
	corbet@....net, ieidus@...hat.com
Subject: Re: [PATCH 3/4] add ksm kernel shared memory driver.

> +	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.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ