From nobody Mon Feb 9 20:30:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1650986019; cv=none; d=zohomail.com; s=zohoarc; b=chSYgyFrQhmyXPgpAuvzjezCgWRMTZknXrUqg/zmj6dLeTYigXTyWt6DBuDD2TFsWFcR5AsvemNRI2EYyRPf/fh9YydwZlnAk+4B/Z2GnKJmO0dhaNsbQI+K9g+VPRMOfXZKNS2E7lAh7IahkKmrs3RcXGQIVCCLc5NbwcEdGjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650986019; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Q7dZwdxLziK7Kvy6nu28pq8wmJA1TM4ERa5uCbZiRC0=; b=GLb3XvesyU+V4GtdFyi/UoXyX/okrP2v3GzNC8m++vbXsYZPiim/jOhMf157A14vprk53xeRAT41Ab0xoNEFE4v4tZqX70ijxlD3am53SXdfDDF7NTNJ324HMsUalQWnSPIzDBoSEIqChBu8q/u3+ESwD1HYw2K28nJnOUyKLs0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1650986019841820.7291692804176; Tue, 26 Apr 2022 08:13:39 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-258-EQ87GLsrMMmX7AKfm3I5Bg-1; Tue, 26 Apr 2022 11:13:36 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CAAFF2999B38; Tue, 26 Apr 2022 15:13:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B86B9C4C7A1; Tue, 26 Apr 2022 15:13:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 870FF1947BBB; Tue, 26 Apr 2022 15:13:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BB973194035F for ; Tue, 26 Apr 2022 15:13:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AAE9F54ED18; Tue, 26 Apr 2022 15:13:30 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id E425854E895; Tue, 26 Apr 2022 15:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650986018; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Q7dZwdxLziK7Kvy6nu28pq8wmJA1TM4ERa5uCbZiRC0=; b=cmdaiojYXXrlQ0e48TsMjT/K0XXCtFm3xcUysSZmp+7T+hYJb4W4EzkuT6OPY1ql1sSV7y oIbMUCWVjFHJpnmjJYaWxPJo0how8A9mhlMsZQVmf7k9U/gp3bwkBrswWp1+XUJ12rweBa csV10Ba6WpIPfDi8h7/SwDGdkRz05Zg= X-MC-Unique: EQ87GLsrMMmX7AKfm3I5Bg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 2/3] hw/char: fix qcode array bounds check in ESCC impl Date: Tue, 26 Apr 2022 16:13:22 +0100 Message-Id: <20220426151323.729982-3-berrange@redhat.com> In-Reply-To: <20220426151323.729982-1-berrange@redhat.com> References: <20220426151323.729982-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Beraldo Leal , libvir-list@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1650986021808100003 There was an off-by-1 in the qcode conversion array bounds check. Fixes: e709a61a8fe1076a487376fd657544418a38ba06 Reported-by: Peter Maydell Reviewed-by: Peter Maydell Signed-off-by: Daniel P. Berrang=C3=A9 --- hw/char/escc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/escc.c b/hw/char/escc.c index 8755d8d34f..17a908c59b 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -828,7 +828,7 @@ static void sunkbd_handle_event(DeviceState *dev, QemuC= onsole *src, } } =20 - if (qcode > qemu_input_map_qcode_to_sun_len) { + if (qcode >=3D qemu_input_map_qcode_to_sun_len) { return; } =20 --=20 2.35.1