blob: f1d72f8aa7af1e8acd2c94e72649d70439c866e2 [file] [log] [blame]
From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: <linux-cve-announce@vger.kernel.org>
Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: CVE-2021-47048: spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op
When handling op->addr, it is using the buffer "tmpbuf" which has been
freed. This will trigger a use-after-free KASAN warning. Let's use
temporary variables to store op->addr.val and op->cmd.opcode to fix
this issue.
The Linux kernel CVE team has assigned CVE-2021-47048 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.10 with commit 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e and fixed in 5.10.37 with commit 1231279389b5e638bc3b66b9741c94077aed4b5a
Issue introduced in 5.10 with commit 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e and fixed in 5.11.21 with commit d67e0d6bd92ebbb0294e7062bbf5cdc773764e62
Issue introduced in 5.10 with commit 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e and fixed in 5.12.4 with commit 23269ac9f123eca3aea7682d3345c02e71ed696c
Issue introduced in 5.10 with commit 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e and fixed in 5.13 with commit a2c5bedb2d55dd27c642c7b9fb6886d7ad7bdb58
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2021-47048
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/spi/spi-zynqmp-gqspi.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/1231279389b5e638bc3b66b9741c94077aed4b5a
https://git.kernel.org/stable/c/d67e0d6bd92ebbb0294e7062bbf5cdc773764e62
https://git.kernel.org/stable/c/23269ac9f123eca3aea7682d3345c02e71ed696c
https://git.kernel.org/stable/c/a2c5bedb2d55dd27c642c7b9fb6886d7ad7bdb58