linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Felix Fietkau <nbd@nbd.name>
Subject: [PATCH 4.19 1/8] Revert "mtd: spinand: Fix OOB read"
Date: Thu,  7 Jan 2021 15:32:01 +0100	[thread overview]
Message-ID: <20210107143047.732584985@linuxfoundation.org> (raw)
In-Reply-To: <20210107143047.586006010@linuxfoundation.org>

From: Felix Fietkau <nbd@nbd.name>

This reverts stable commit baad618d078c857f99cc286ea249e9629159901f.

This commit is adding lines to spinand_write_to_cache_op, wheras the upstream
commit 868cbe2a6dcee451bd8f87cbbb2a73cf463b57e5 that this was supposed to
backport was touching spinand_read_from_cache_op.
It causes a crash on writing OOB data by attempting to write to read-only
kernel memory.

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/mtd/nand/spi/core.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -378,10 +378,6 @@ static int spinand_write_to_cache_op(str
 		}
 	}
 
-	if (req->ooblen)
-		memcpy(req->oobbuf.in, spinand->oobbuf + req->ooboffs,
-		       req->ooblen);
-
 	return 0;
 }
 



  reply	other threads:[~2021-01-07 14:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 14:32 [PATCH 4.19 0/8] 4.19.166-rc1 review Greg Kroah-Hartman
2021-01-07 14:32 ` Greg Kroah-Hartman [this message]
2021-01-07 14:32 ` [PATCH 4.19 2/8] dmaengine: at_hdmac: Substitute kzalloc with kmalloc Greg Kroah-Hartman
2021-01-07 14:32 ` [PATCH 4.19 3/8] dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate() Greg Kroah-Hartman
2021-01-07 14:32 ` [PATCH 4.19 4/8] dmaengine: at_hdmac: add missing kfree() " Greg Kroah-Hartman
2021-01-07 14:32 ` [PATCH 4.19 5/8] kdev_t: always inline major/minor helper functions Greg Kroah-Hartman
2021-01-07 14:32 ` [PATCH 4.19 6/8] iio:imu:bmi160: Fix alignment and data leak issues Greg Kroah-Hartman
2021-01-07 14:32 ` [PATCH 4.19 7/8] iio:magnetometer:mag3110: " Greg Kroah-Hartman
2021-01-07 14:32 ` [PATCH 4.19 8/8] mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start Greg Kroah-Hartman
2021-01-07 17:58 ` [PATCH 4.19 0/8] 4.19.166-rc1 review Pavel Machek
2021-01-09 12:44   ` Greg Kroah-Hartman
2021-01-08  1:10 ` Shuah Khan
2021-01-08  2:44 ` Naresh Kamboju
2021-01-08 17:39 ` Guenter Roeck

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=20210107143047.732584985@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=nbd@nbd.name \
    --cc=stable@vger.kernel.org \
    /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).