linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Phillip Lougher <phillip@squashfs.org.uk>
Cc: linux-kernel@vger.kernel.org,
	syzbot+6fba78f99b9afd4b5634@syzkaller.appspotmail.com
Subject: Re: [PATCH 1/4] Squashfs: avoid out of bounds writes in decompressors
Date: Thu, 4 Feb 2021 16:53:26 -0800	[thread overview]
Message-ID: <20210204165326.7700111635890f9476b479ae@linux-foundation.org> (raw)
In-Reply-To: <20210204130249.4495-2-phillip@squashfs.org.uk>

On Thu,  4 Feb 2021 13:02:46 +0000 Phillip Lougher <phillip@squashfs.org.uk> wrote:

> This is a regression introduced by the patch "migrate from ll_rw_block
> usage to BIO".

Fixes: 93e72b3c612adc ("squashfs: migrate from ll_rw_block usage to BIO")

> Sysbot/Syskaller has reported a number of "out of bounds writes" and
> "unable to handle kernel paging request in squashfs_decompress" errors
> which have been identified as a regression introduced by the above patch.
> 
> Specifically, the patch removed the following sanity check
> 
> if (length < 0 || length > output->length ||
> 		(index + length) > msblk->bytes_used)
> 
> This check did two things:
> 
> 1. It ensured any reads were not beyond the end of the filesystem
> 
> 2. It ensured that the "length" field read from the filesystem
>    was within the expected maximum length.  Without this any
>    corrupted values can over-run allocated buffers.
> 

All sounds fairly serious.  Should I add a cc:stable to this?

           reply	other threads:[~2021-02-05  0:54 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20210204130249.4495-2-phillip@squashfs.org.uk>]

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=20210204165326.7700111635890f9476b479ae@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip@squashfs.org.uk \
    --cc=syzbot+6fba78f99b9afd4b5634@syzkaller.appspotmail.com \
    /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).