Package: bzip2
Version: 1.0.2-7
Severity: important
Tags: security

Hi!

bzgrep is also vulnerable to the recently fixed code injection in
zgrep (CAN-2005-0758):

$ echo 'Hello World' > 'foo:|;wMUHAHA'
$ bzgrep World *
foo:Hello World
...
$ $ ls MUHA*
MUHAHA:|

Of course this is a very crude example, but it can certainly be
refined.

I ported the zgrep patch to bzgrep:

 http://patches.ubuntu.com/patches/bzip2.CAN-2005-0758.diff

Please note that I used shell substitutions to avoid calling sed. This
is how other distros did it and it seems sensible to me (I also
adapted the hashbang since it is a bashism). Of course you can also
extend the sed command to quote \ and |.

Thanks,

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

Attachment: signature.asc
Description: Digital signature

Reply via email to