From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNKUL-0006KE-2N for qemu-devel@nongnu.org; Thu, 15 Nov 2018 11:27:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNKUF-0005Q8-Ty for qemu-devel@nongnu.org; Thu, 15 Nov 2018 11:27:29 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:38959) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNKUD-0005Oq-Di for qemu-devel@nongnu.org; Thu, 15 Nov 2018 11:27:23 -0500 Received: by mail-wr1-x444.google.com with SMTP id b13so21853251wrx.6 for ; Thu, 15 Nov 2018 08:27:19 -0800 (PST) References: <20181115143535.5885-1-peter.maydell@linaro.org> <20181115143535.5885-2-peter.maydell@linaro.org> From: Richard Henderson Message-ID: Date: Thu, 15 Nov 2018 17:27:15 +0100 MIME-Version: 1.0 In-Reply-To: <20181115143535.5885-2-peter.maydell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-3.1 1/2] hw/block/onenand: Fix off-by-one error allowing out-of-bounds read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org, Thomas Huth On 11/15/18 3:35 PM, Peter Maydell wrote: > An off-by-one error in a switch case in onenand_read() allowed > a misbehaving guest to read off the end of a block of memory. > > NB: the onenand device is used only by the "n800" and "n810" > machines, which are usable only with TCG, not KVM, so this is > not a security issue. > > Reported-by: Thomas Huth > Suggested-by: Richard Henderson > Signed-off-by: Peter Maydell > --- > I tweaked RTH's suggested fix to use an 0xbffe offset so > we don't overrun on an access to 0xbfff either. > > hw/block/onenand.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~