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]
Message-ID: <20100613221803.GB3829@joi.lan>
Date:	Mon, 14 Jun 2010 00:18:03 +0200
From:	Marcin Slusarz <marcin.slusarz@...il.com>
To:	x86@...nel.org
Cc:	LKML <linux-kernel@...r.kernel.org>, Pekka Paalanen <pq@....fi>,
	Stuart Bennett <stuart@...edesktop.org>,
	Marcin Koƛcielnicki <koriakin@...4.net>,
	Shinpei KATO <shinpei@...is.s.u-tokyo.ac.jp>,
	nouveau@...ts.freedesktop.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCHv2] kmmio/mmiotrace: fix double free of kmmio_fault_pages

On Sun, Jun 13, 2010 at 11:56:54PM +0200, Marcin Slusarz wrote:
> After every iounmap mmiotrace has to free kmmio_fault_pages, but it
> can't do it directly, so it defers freeing by RCU.
> 
> It usually works, but when mmiotraced code calls ioremap-iounmap
> multiple times without sleeping between (so RCU won't kick in and
> start freeing) it can be given the same virtual address, so at
> every iounmap mmiotrace will schedule the same pages for release.
> Obviously it will explode on second free.
> 
> Fix it by marking kmmio_fault_pages which are scheduled for release
> and not adding them second time.
> 
> Signed-off-by: Marcin Slusarz <marcin.slusarz@...il.com>
> Acked-by: Pekka Paalanen <pq@....fi>
> Cc: Stuart Bennett <stuart@...edesktop.org>
> Tested-by: Marcin Koƛcielnicki <koriakin@...4.net>
> Tested-by: Shinpei KATO <shinpei@...is.s.u-tokyo.ac.jp>
> ---

It would be good to apply it to -stable too. Sometimes people has to test
some earlier kernels because of unfixable constraints (you know, these
uncooperative vendors not releasing their binary drivers for latest kernels)

Marcin
--
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