Re: zlib vulnerability and modutils

Ville Herva (vherva@niksula.hut.fi)
Tue, 12 Mar 2002 15:37:29 +0200


On Tue, Mar 12, 2002 at 11:46:42AM +0200, you [Ville Herva] wrote:
> On Tue, Mar 12, 2002 at 02:08:28AM +0200, you [Ville Herva] wrote:
> > >
> > > It may be a little more intrusive than you wanted though.
> >
> > Quite possibly -- at least considering that some of the kernels I run are
> > still 2.2.x and even 2.0.x...
>
> I suppose this patch
>
> http://cvs.samba.org/cgi-bin/cvsweb/rsync/zlib/infblock.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.6&f=u
>
> is closer to what I need. It seems most vendors have only patched ppp's zlib
> implementation (drivers/net/zlib.c). I couldn't find that particular patch
> in redhat update kernel .src.rpm, tough. I guess I'll have to apply the zlib
> diff by hand.

Ok, I found the following in the redhat errata kernel .src.rpm. It was well
hidden in ipvs-1.0.6-2.2.19.patch... I guess this is the same that Arjan
sent to Alan.

However, this does not apply to 2.0.

-- v --

v@iki.fi

--- linux/drivers/net/zlib.c Fri Feb 8 10:35:28 2001
+++ linux/drivers/net/zlib.c Fri Feb 8 10:35:30 2001
@@ -3860,10 +3860,11 @@
&s->sub.trees.tb, z);
if (t != Z_OK)
{
- ZFREE(z, s->sub.trees.blens);
r = t;
- if (r == Z_DATA_ERROR)
+ if (r == Z_DATA_ERROR) {
s->mode = BADB;
+ ZFREE(z, s->sub.trees.blens);
+ }
LEAVE
}
s->sub.trees.index = 0;
@@ -3928,14 +3929,16 @@
#endif
t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
s->sub.trees.blens, &bl, &bd, &tl, &td, z);
- ZFREE(z, s->sub.trees.blens);
if (t != Z_OK)
{
- if (t == (uInt)Z_DATA_ERROR)
+ if (t == (uInt)Z_DATA_ERROR) {
s->mode = BADB;
+ ZFREE(z, s->sub.trees.blens);
+ }
r = t;
LEAVE
}
+ ZFREE(z, s->sub.trees.blens);
Tracev((stderr, "inflate: trees ok, %d * %d bytes used\n",
inflate_hufts, sizeof(inflate_huft)));
if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/