mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: akpm <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>, edward@namesys.com, vs@namesys.com
Subject: [PATCH -mm] reiser4: remove lzo compression security hole
Date: Thu, 24 May 2007 23:54:00 +0100	[thread overview]
Message-ID: <1180047240.12821.48.camel@localhost.localdomain> (raw)

Switch reiser4 to use lzo1x_decompress_safe instead of lzo1x_decompress
as otherwise it presents a security hole (lzo1x_decompress doesn't
perform bounds checking on the decompressed data).

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>

---
 fs/reiser4/plugin/compress/compress.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.21/fs/reiser4/plugin/compress/compress.c
===================================================================
--- linux-2.6.21.orig/fs/reiser4/plugin/compress/compress.c	2007-05-16 20:47:45.000000000 +0100
+++ linux-2.6.21/fs/reiser4/plugin/compress/compress.c	2007-05-24 23:43:28.000000000 +0100
@@ -319,7 +319,7 @@ lzo1_decompress(coa_t coa, __u8 * src_fi
 	assert("edward-851", coa == NULL);
 	assert("edward-852", src_len != 0);
 
-	result = lzo1x_decompress(src_first, src_len, dst_first, &dstlen, NULL);
+	result = lzo1x_decompress_safe(src_first, src_len, dst_first, &dstlen, NULL);
 	if (result != LZO_E_OK)
 		warning("edward-853", "lzo1x_1_decompress failed\n");
 	*dst_len = dstlen;



             reply	other threads:[~2007-05-24 22:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 22:54 Richard Purdie [this message]
2007-05-28 21:00 ` Edward Shishkin

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=1180047240.12821.48.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --cc=akpm@linux-foundation.org \
    --cc=edward@namesys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vs@namesys.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®