qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] hw/nvme/ctrl: Prohibit DMA accesses to devices (CVE-2021


From: Mauro Matteo Cascella
Subject: Re: [PATCH 2/2] hw/nvme/ctrl: Prohibit DMA accesses to devices (CVE-2021-3929)
Date: Thu, 16 Dec 2021 19:21:09 +0100

On Thu, Dec 16, 2021 at 6:55 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> Fixes: CVE-2021-3929

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2020298

> Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/nvme/ctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
> index 604ed0aea0d..2be2c340b34 100644
> --- a/hw/nvme/ctrl.c
> +++ b/hw/nvme/ctrl.c
> @@ -1146,7 +1146,7 @@ static uint16_t nvme_tx(NvmeCtrl *n, NvmeSg *sg, 
> uint8_t *ptr, uint32_t len,
>      assert(sg->flags & NVME_SG_ALLOC);
>
>      if (sg->flags & NVME_SG_DMA) {
> -        const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
> +        const MemTxAttrs attrs = { .memory = true };
>          MemTxResult res;
>          uint64_t residual;
>
> --
> 2.33.1
>

-- 
Mauro Matteo Cascella
Red Hat Product Security
PGP-Key ID: BB3410B0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]