All of lore.kernel.org
 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 5.4 02/13] Revert "mtd: spinand: Fix OOB read"
Date: Thu,  7 Jan 2021 15:33:21 +0100	[thread overview]
Message-ID: <20210107143050.259221202@linuxfoundation.org> (raw)
In-Reply-To: <20210107143049.929352526@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
@@ -317,10 +317,6 @@ static int spinand_write_to_cache_op(str
 		buf += ret;
 	}
 
-	if (req->ooblen)
-		memcpy(req->oobbuf.in, spinand->oobbuf + req->ooboffs,
-		       req->ooblen);
-
 	return 0;
 }
 



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

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 14:33 [PATCH 5.4 00/13] 5.4.88-rc1 review Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 01/13] Revert "drm/amd/display: Fix memory leaks in S3 resume" Greg Kroah-Hartman
2021-01-07 14:33   ` Greg Kroah-Hartman
2021-01-07 14:33 ` Greg Kroah-Hartman [this message]
2021-01-07 14:33 ` [PATCH 5.4 03/13] dmaengine: at_hdmac: Substitute kzalloc with kmalloc Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 04/13] dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate() Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 05/13] dmaengine: at_hdmac: add missing kfree() " Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 06/13] kdev_t: always inline major/minor helper functions Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 07/13] iio:imu:bmi160: Fix alignment and data leak issues Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 08/13] fuse: fix bad inode Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 09/13] perf: Break deadlock involving exec_update_mutex Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 10/13] rwsem: Implement down_read_killable_nested Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 11/13] rwsem: Implement down_read_interruptible Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 12/13] exec: Transform exec_update_mutex into a rw_semaphore Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.4 13/13] mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start Greg Kroah-Hartman
2021-01-07 20:20 ` [PATCH 5.4 00/13] 5.4.88-rc1 review Jon Hunter
2021-01-08  1:11 ` Shuah Khan
2021-01-08  2:28 ` 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=20210107143050.259221202@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.