From nobody Tue Apr 16 04:36:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637764144994367.8010419582862; Wed, 24 Nov 2021 06:29:04 -0800 (PST) Received: from localhost ([::1]:55292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mptGg-0006jf-U5 for importer@patchew.org; Wed, 24 Nov 2021 09:29:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mptFV-0004Cm-Ay for qemu-devel@nongnu.org; Wed, 24 Nov 2021 09:27:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:48477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mptFT-00063A-7D for qemu-devel@nongnu.org; Wed, 24 Nov 2021 09:27:49 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-379-YIX7btrjNLS_-_uXT8gQYQ-1; Wed, 24 Nov 2021 09:27:40 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCB16835E21; Wed, 24 Nov 2021 14:27:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.195.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id E432060843; Wed, 24 Nov 2021 14:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637764066; h=from:from: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; bh=HjDg+xhiaWoTMLg/wOzuegHrIxh++Uy+St0mj1vAJeo=; b=G35LKf3Y+Q2EH2lyG4gORCm2N9/zLjGwDnOjP7hs2wAfZuKA3Dg53PeDtqAxKV52pDjgG7 nSV7F5BHjz3aor+Lgh1ZIv5//AbIKzpc2YmkP+QZ4KNAjCpwO5/BD6CNfOtTn505dOMPMp BmiygHl7K10LYZKNXXFViLOYOwQoUgE= X-MC-Unique: YIX7btrjNLS_-_uXT8gQYQ-1 From: Kashyap Chamarthy To: qemu-devel@nongnu.org Subject: [PATCH 1/2] docs: rSTify "security-process" page; move it to QEMU Git Date: Wed, 24 Nov 2021 15:27:27 +0100 Message-Id: <20211124142728.1221817-2-kchamart@redhat.com> In-Reply-To: <20211124142728.1221817-1-kchamart@redhat.com> References: <20211124142728.1221817-1-kchamart@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kchamart@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kchamart@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, thuth@redhat.com, Kashyap Chamarthy , eblake@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637764145956100003 This is based on Paolo's suggestion[1] that the 'security-process'[2] page being a candidate for docs/devel. Converted from Markdown to rST using: $> pandoc -f markdown -t rst security-process.md \ -o security-process.rst It's a 1-1 conversion (I double-checked to the best I could). I've also checked that the hyperlinks work correctly post-conversion. [1] https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg04002.html [2] https://www.qemu.org/contribute/security-process Suggested-by: Paolo Bonzini Signed-off-by: Kashyap Chamarthy Reviewed-by: Peter Maydell --- docs/devel/index.rst | 1 + docs/devel/security-process.rst | 190 ++++++++++++++++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 docs/devel/security-process.rst diff --git a/docs/devel/index.rst b/docs/devel/index.rst index afd937535e..424eff9294 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -48,3 +48,4 @@ modifying QEMU's source code. trivial-patches submitting-a-patch submitting-a-pull-request + security-process diff --git a/docs/devel/security-process.rst b/docs/devel/security-process.= rst new file mode 100644 index 0000000000..cc1000fe43 --- /dev/null +++ b/docs/devel/security-process.rst @@ -0,0 +1,190 @@ +.. _security-process: + +Security Process +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Please report any suspected security issue in QEMU to the security +mailing list at: + +- ` `__ + +To report an issue via `GPG `__ encrypted email, +please send it to the Red Hat Product Security team at: + +- ` `__ + +**Note:** after the triage, encrypted issue details shall be sent to the +upstream =E2=80=98qemu-security=E2=80=99 mailing list for archival purpose= s. + +How to report an issue +---------------------- + +- Please include as many details as possible in the issue report. Ex: + + - QEMU version, upstream commit/tag + - Host & Guest architecture x86/Arm/PPC, 32/64 bit etc. + - Affected code area/snippets + - Stack traces, crash details + - Malicious inputs/reproducer steps etc. + - Any configurations/settings required to trigger the issue. + +- Please share the QEMU command line used to invoke a guest VM. + +- Please specify whom to acknowledge for reporting this issue. + +How we respond +~~~~~~~~~~~~~~ + +- Process of handling security issues comprises following steps: + + 0) **Acknowledge:** + + - A non-automated response email is sent to the reporter(s) to + acknowledge the reception of the report. (*60 day=E2=80=99s counter = starts + here*) + + 1) **Triage:** + + - Examine the issue details and confirm whether the issue is genuine + - Validate if it can be misused for malicious purposes + - Determine its worst case impact and severity + [Low/Moderate/Important/Critical] + + 2) **Response:** + + - Negotiate embargo timeline (if required, depending on severity) + - Request a `CVE `__ and open an + upstream `bug `__ + - Create an upstream fix patch annotated with + + - CVE-ID + - Link to an upstream bugzilla + - Reported-by, Tested-by etc. tags + + - Once the patch is merged, close the upstream bug with a link to + the commit + + - Fixed in: + +- Above security lists are operated by select analysts, maintainers + and/or representatives from downstream communities. + +- List members follow a **responsible disclosure** policy. Any + non-public information you share about security issues, is kept + confidential within members of the QEMU security team and a minimal + supporting staff in their affiliated companies. Such information will + not be disclosed to third party organisations/individuals without + prior permission from the reporter(s). + +- We aim to process security issues within maximum of **60 days**. That + is not to say that issues will remain private for 60 days, nope. + After the triaging step above + + - If severity of the issue is sufficiently low, an upstream public + bug will be created immediately. + - If severity of the issue requires co-ordinated disclosure at a + future date, then the embargo process below is followed, and + upstream bug will be opened at the end of the embargo period. + + This will allow upstream contributors to create, test and track fix + patch(es). + +Publication embargo +~~~~~~~~~~~~~~~~~~~ + +- If a security issue is reported that is not already public and its + severity requires coordinated disclosure, then an embargo date will + be set and communicated to the reporter(s). + +- Embargo periods will be negotiated by mutual agreement between + reporter(s), members of the security list and other relevant parties + to the problem. The preferred embargo period is upto `2 + weeks `__. + However, longer embargoes may be negotiated if the severity of the + issue requires it. + +- Members of the security list agree not to publicly disclose any + details of an embargoed security issue until its embargo date + expires. + +CVE allocation +~~~~~~~~~~~~~~ + +Each security issue is assigned a `CVE `__ +number. The CVE number is allocated by one of the vendor security +engineers on the security list. + +When to contact the QEMU Security List +-------------------------------------- + +You should contact the Security List if: \* You think there may be a +security vulnerability in QEMU. \* You are unsure about how a known +vulnerability affects QEMU. \* You can contact us in English. We are +unable to respond in other languages. + +When *not* to contact the QEMU Security List +-------------------------------------------- + +- You need assistance in a language other than English. +- You require technical assistance (for example, =E2=80=9Chow do I config= ure + QEMU?=E2=80=9D). +- You need help upgrading QEMU due to security alerts. +- Your issue is not security related. + +How impact and severity of a bug is decided +------------------------------------------- + +**Security criterion:** -> +https://www.qemu.org/docs/master/system/security.html + +All security issues in QEMU are not equal. Based on the parts of the +QEMU sources wherein the bug is found, its impact and severity could +vary. + +In particular, QEMU is used in many different scenarios; some of them +assume that the guest is trusted, some of them don=E2=80=99t. General +considerations to triage QEMU issues and decide whether a configuration +is security sensitive include: + +- Is there any feasible way for a malicious party to exploit this flaw + and cause real damage? (e.g.=C2=A0from a guest or via downloadable imag= es) +- Does the flaw require access to the management interface? Would the + management interface be accessible in the scenario where the flaw + could cause real damage? +- Is QEMU used in conjunction with a hypervisor (as opposed to TCG + binary translation)? +- Is QEMU used to offer virtualised production services, as opposed to + usage as a development platform? + +Whenever some or all of these questions have negative answers, what +appears to be a major security flaw might be considered of low severity +because it could only be exercised in use cases where QEMU and +everything interacting with it is trusted. + +For example, consider upstream commit `9201bb9 =E2=80=9Csdhci.c: Limit the +maximum block +size=E2=80=9D `__, = an of +out of bounds (OOB) memory access (ie. buffer overflow) issue that was +found and fixed in the SD Host Controller emulation (hw/sd/sdhci.c). + +On the surface, this bug appears to be a genuine security flaw, with +potentially severe implications. But digging further down, there are +only two ways to use SD Host Controller emulation, one is via +=E2=80=98sdhci-pci=E2=80=99 interface and the other is via =E2=80=98generi= c-sdhci=E2=80=99 interface. + +Of these two, the =E2=80=98sdhci-pci=E2=80=99 interface had actually been = disabled by +default in the upstream QEMU releases (commit `1910913 =E2=80=9Csdhci: Make +device=E2=80=9Dsdhci-pci" unavailable with +-device" `__ at +the time the flaw was reported; therefore, guests could not possibly use +=E2=80=98sdhci-pci=E2=80=99 for any purpose. + +The =E2=80=98generic-sdhci=E2=80=99 interface, instead, had only one user = in =E2=80=98Xilinx +Zynq Baseboard emulation=E2=80=99 (hw/arm/xilinx_zynq.c). Xilinx Zynq is a +programmable systems on chip (SoC) device. While QEMU does emulate this +device, in practice it is used to facilitate cross-platform +developmental efforts, i.e.=C2=A0QEMU is used to write programs for the SoC +device. In such developer environments, it is generally assumed that the +guest is trusted. + +And thus, this buffer overflow turned out to be a security non-issue. --=20 2.31.1 From nobody Tue Apr 16 04:36:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637764310545858.5190457520073; Wed, 24 Nov 2021 06:31:50 -0800 (PST) Received: from localhost ([::1]:60524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mptJM-0002Ff-Bo for importer@patchew.org; Wed, 24 Nov 2021 09:31:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mptFc-0004Jj-Uh for qemu-devel@nongnu.org; Wed, 24 Nov 2021 09:27:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mptFa-000654-MB for qemu-devel@nongnu.org; Wed, 24 Nov 2021 09:27:56 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-147-qSa_g6VRO2OP1LoTS9l0pQ-1; Wed, 24 Nov 2021 09:27:49 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B27D284B9A1; Wed, 24 Nov 2021 14:27:48 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.195.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BAB760843; Wed, 24 Nov 2021 14:27:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637764074; h=from:from: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; bh=1ynQhD3fPExjXoX0JCZSQX4qi2EqAa+ehZFYV5RduCA=; b=Dl6LPTs+GCpV6ee0amkU/6PrZKQ/dgX+k8Iz9XUjnDG8f+R3d8WOiLZTa7RejMlZmhGWRW ooERBSfIMB0gQAglp4jMfAUhkvZuuriRI73fyhTOtUVAnW2QhWxOwxSU/zLaWg0pCZkM0m Bj72v24twT+vU2z9NBAnnwFuabp7SPw= X-MC-Unique: qSa_g6VRO2OP1LoTS9l0pQ-1 From: Kashyap Chamarthy To: qemu-devel@nongnu.org Subject: [PATCH 2/2] docs: rSTify "report-a-bug" page; move it to QEMU Git Date: Wed, 24 Nov 2021 15:27:28 +0100 Message-Id: <20211124142728.1221817-3-kchamart@redhat.com> In-Reply-To: <20211124142728.1221817-1-kchamart@redhat.com> References: <20211124142728.1221817-1-kchamart@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kchamart@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kchamart@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, thuth@redhat.com, Kashyap Chamarthy , eblake@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637764312057100001 This is also based on Paolo's suggestion[1] of "report-a-bug" page[2] from the QEMU website being a candidate for docs/devel. Converted from Markdown to rST using: $> pandoc -f markdown -t rst report-a-bug.md \ -o reporting-a-bug.rst Modifications: - Rename this from "report-a-bug" page to "reporting-a-bug" to be consistent with existing in-tree docs. - Use internal rST reference to "submitting-a-patch.rst"; and slightly tweak the sentence where this is referenced. - Also tweak the description at the top of the 'index.rst' to to reflect that the manual also documents some of QEMU's development processes. [1] https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg04002.html [2] https://www.qemu.org/contribute/report-a-bug/ Suggested-by: Paolo Bonzini Signed-off-by: Kashyap Chamarthy --- docs/devel/index.rst | 8 +++++--- docs/devel/reporting-a-bug.rst | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 docs/devel/reporting-a-bug.rst diff --git a/docs/devel/index.rst b/docs/devel/index.rst index 424eff9294..39797679de 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -2,9 +2,10 @@ Developer Information --------------------- =20 -This section of the manual documents various parts of the internals of QEM= U. -You only need to read it if you are interested in reading or -modifying QEMU's source code. +This section of the manual documents some of QEMU's development +practises, and various internals of QEMU. These documents are +particularly useful for those interested in reading or modifying QEMU's +source code. =20 .. toctree:: :maxdepth: 2 @@ -49,3 +50,4 @@ modifying QEMU's source code. submitting-a-patch submitting-a-pull-request security-process + reporting-a-bug diff --git a/docs/devel/reporting-a-bug.rst b/docs/devel/reporting-a-bug.rst new file mode 100644 index 0000000000..a72f91caf4 --- /dev/null +++ b/docs/devel/reporting-a-bug.rst @@ -0,0 +1,37 @@ +.. _reporting-a-bug: + +Reporting a bug +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Bugs can be filed at our `bug +tracker `__, which is +hosted on GitLab. Note: If you=E2=80=99ve got a problem with how your Linux +distribution packages QEMU, please use the bug tracker from your distro +instead. + +When submitting a bug report, please try to do the following: + +- Include the QEMU release version or the git commit hash into the + description, so that it is later still clear in which version you + have found the bug. Reports against the `latest + release `__ or even the latest development tree + are usually acted upon faster. + +- Include the full command line used to launch the QEMU guest. + +- Reproduce the problem directly with a QEMU command-line. Avoid + frontends and management stacks, to ensure that the bug is in QEMU + itself and not in a frontend. + +- Include information about the host and guest (operating system, + version, 32/64-bit). + +QEMU does not use GitLab merge requests; patches are sent to the mailing +list according to the guidelines mentioned here: :ref:`submitting-a-patch`. + +Do **NOT** report security issues (or other bugs, too) as =E2=80=9Cconfide= ntial=E2=80=9D +bugs in the bug tracker. QEMU has a :ref:`security-process` for issues +that should be reported in a non-public way instead. + +For problems with KVM in the kernel, use the kernel bug tracker instead; +the `KVM wiki `__ has the details. --=20 2.31.1