From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753960AbdDMNp5 (ORCPT ); Thu, 13 Apr 2017 09:45:57 -0400 Received: from foss.arm.com ([217.140.101.70]:55078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751054AbdDMNpy (ORCPT ); Thu, 13 Apr 2017 09:45:54 -0400 Date: Thu, 13 Apr 2017 14:45:24 +0100 From: Mark Rutland To: Andrey Konovalov Cc: Marc Zyngier , kvm@vger.kernel.org, Catalin Marinas , Will Deacon , LKML , Kostya Serebryany , syzkaller , linux-arm-kernel@lists.infradead.org, Dmitry Vyukov , Paolo Bonzini , kvmarm@lists.cs.columbia.edu Subject: Re: kvm/arm64: use-after-free in kvm_unmap_hva_handler/unmap_stage2_pmds Message-ID: <20170413134524.GF24027@leverpostej> References: <20f6c994-d83e-7a6f-9f13-f10287211a6c@arm.com> <9f473bb9-d0eb-6803-1263-75ffef0301fe@redhat.com> <1050c9d8-5813-5df9-29e5-3ab6e61b5de6@arm.com> <20170413093418.GC24027@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 13, 2017 at 01:53:13PM +0200, Andrey Konovalov wrote: > On Thu, Apr 13, 2017 at 11:34 AM, Mark Rutland wrote: > > I had a go at reproducing this on an arm64 board following [1], but so > > far I've had no luck. [...] > Hi Mark, > > You assume that you have KASAN enabled. Yes; I have KASAN_OUTLINE enabled. > Since a few unintended line breaks were added in the email, here's the > program in plaintext: > https://gist.githubusercontent.com/xairy/69864355b5a64f74e7cb445b7325a7df/raw/bdbbbf177dbea13eac0a5ddfa9c3e6c32695b13b/kvm-arm-uaf-log Thanks! > I run it as: > # ./syz-execprog -repeat=0 -collide=false -sandbox=namespace ./kvm-arm-uaf-log Thanks again. Having the exact command was very helpful for sanity-checking my configuration. In the end, it turned out that in my filesystem, /dev/kvm was not accessible by the nobody user, so the executor couldn't open it, and none of the KVM paths were being triggered. > And it takes less than a second to trigger the bug. After having chomd'd /dev/kvm appropriately, I can also reproduce the issue within a second or two, running the same command. Thanks, Mark.