qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Fam Zheng <fam@euphon.net>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, Prasad J Pandit <ppandit@redhat.com>,
	Bandan Das <bsd@redhat.com>, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v3] docs/secure-coding-practices: Describe how to use 'null-co' block driver
Date: Tue, 1 Jun 2021 13:12:24 +0200	[thread overview]
Message-ID: <YLYWGEZPJ/1Y72R9@merkur.fritz.box> (raw)
In-Reply-To: <20210601053503.1828319-1-philmd@redhat.com>

Am 01.06.2021 um 07:35 hat Philippe Mathieu-Daudé geschrieben:
> Document that security reports must use 'null-co,read-zeroes=on'
> because otherwise the memory is left uninitialized (which is an
> on-purpose performance feature).
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v3: Simplified using Vladimir suggestion.
> ---
>  docs/devel/secure-coding-practices.rst | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/docs/devel/secure-coding-practices.rst b/docs/devel/secure-coding-practices.rst
> index cbfc8af67e6..79a3dcd09a3 100644
> --- a/docs/devel/secure-coding-practices.rst
> +++ b/docs/devel/secure-coding-practices.rst
> @@ -104,3 +104,12 @@ structures and only process the local copy.  This prevents
>  time-of-check-to-time-of-use (TOCTOU) race conditions that could cause QEMU to
>  crash when a vCPU thread modifies guest RAM while device emulation is
>  processing it.
> +
> +Use of null-co block drivers
> +----------------------------
> +
> +The ``null-co`` block driver is designed for performance: its read accesses are
> +not initialized by default. In case it this driver has to be used for security

"it this driver" is probably a typo?

> +research, it must be used with the ``read-zeroes=on`` option which fills read
> +buffers with zeroes. Security issues reported with the default
> +(``read-zeroes=off``) will be discarded.

Kevin



      parent reply	other threads:[~2021-06-01 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  5:35 [PATCH v3] docs/secure-coding-practices: Describe how to use 'null-co' block driver Philippe Mathieu-Daudé
2021-06-01  7:16 ` Vladimir Sementsov-Ogievskiy
2021-06-01 11:12 ` Kevin Wolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YLYWGEZPJ/1Y72R9@merkur.fritz.box \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=bsd@redhat.com \
    --cc=fam@euphon.net \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=ppandit@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).