From: Herbert Xu <herbert@gondor.apana.org.au>
To: Sean Snider <ssnider5@outlook.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lib/lzo: check output space before writing the RLE header
Date: Fri, 6 Nov 2026 19:28:40 +0800 [thread overview]
Message-ID: <au256Pjm3sJ5T22S@gondor.apana.org.au> (raw)
In-Reply-To: <20261016170857.44908-1-ssnider5@outlook.com>
On Fri, Oct 16, 2026 at 05:09:03PM +0000, Sean Snider wrote:
> The safe LZO-RLE compressor writes its two-byte version header before
> checking the available output space. With an output capacity of zero or
> one, these stores exceed the supplied limit. Advancing op past op_end
> also makes the unsigned HAVE_OP() comparison accept later writes.
>
> Check for the two header bytes before emitting them. Use the existing
> output_overrun path, leaving the output length unchanged on this error.
> Ordinary LZO does not emit this header. Valid output is unchanged.
>
> Bounded userspace tests of the kernel codec under ASan/UBSan reproduced
> the boundary violation and passed after the correction. Successful
> full-capacity streams remained byte-identical, and the existing Crypto
> LZO and LZO-RLE compression vectors passed.
>
> Fixes: cc47f07234f7 ("crypto: lzo - Fix compression buffer overrun")
> Assisted-by: LLM
> Signed-off-by: Sean Snider <ssnider5@outlook.com>
> ---
> lib/lzo/lzo1x_compress.c | 1 +
> 1 file changed, 1 insertion(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2026-11-06 11:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 17:09 Sean Snider
2026-11-06 11:28 ` Herbert Xu [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=au256Pjm3sJ5T22S@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ssnider5@outlook.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
all inboxes | Powered by JetHome®