public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Cc: menglong8 dong <menglong8.dong@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	yang yang29 <yang.yang29@zte.com.cn>,
	stable <stable@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] jffs2: check the validity of dstlen in jffs2_zlib_compress()
Date: Thu, 28 Jan 2021 12:22:36 +0100 (CET)	[thread overview]
Message-ID: <95961161.337242.1611832956034.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <b7d9d9db42d639aa143f6e6b98ca7b9f4dcfd46e.camel@infinera.com>

----- Ursprüngliche Mail -----
> Von: "Joakim Tjernlund" <Joakim.Tjernlund@infinera.com>
> An: "menglong8 dong" <menglong8.dong@gmail.com>, "David Woodhouse" <dwmw2@infradead.org>
> CC: "yang yang29" <yang.yang29@zte.com.cn>, "stable" <stable@vger.kernel.org>, "linux-kernel"
> <linux-kernel@vger.kernel.org>, "richard" <richard@nod.at>, "linux-mtd" <linux-mtd@lists.infradead.org>
> Gesendet: Donnerstag, 28. Januar 2021 12:17:34
> Betreff: Re: [PATCH] jffs2: check the validity of dstlen in jffs2_zlib_compress()

> On Thu, 2021-01-28 at 02:55 -0800, menglong8.dong@gmail.com wrote:
>> From: Yang Yang <yang.yang29@zte.com.cn>
>> 
>> KASAN reports a BUG when download file in jffs2 filesystem.It is
>> because when dstlen == 1, cpage_out will write array out of bounds.
>> Actually, data will not be compressed in jffs2_zlib_compress() if
>> data's length less than 4.
> 
> Ouch, data corruption will ensue. Good find!
> I think this needs to go to stable as well.

Indeed! Do you know whether this is a regression?
Seems to be like that since ever.

Thanks,
//richard

      reply	other threads:[~2021-01-28 11:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 10:55 [PATCH] jffs2: check the validity of dstlen in jffs2_zlib_compress() menglong8.dong
2021-01-28 11:17 ` Joakim Tjernlund
2021-01-28 11:22   ` Richard Weinberger [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=95961161.337242.1611832956034.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=Joakim.Tjernlund@infinera.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=menglong8.dong@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=yang.yang29@zte.com.cn \
    /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