Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ClamAV: devel

[PATCH] workaround to invalid names in ole2

 

 

ClamAV devel RSS feed   Index | Next | Previous | View Threaded


sherpya at netfarm

Mar 15, 2007, 1:18 PM

Post #1 of 3 (1179 views)
Permalink
[PATCH] workaround to invalid names in ole2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've already posted something about this, but there was a problem
when detecting real ole2 containers like office document, this
new patch should avoid the regression.
When a file is extracted first it try to create a file
that will fail if the name is invalid (I've seen names with >),
then in this case it will generate a random name.
This should still work with vba office names since they should
be created at the first try.

I've also made a patch that first launch the cab unpacker,
on ole2 then if it fails it will pass it to ole2 if you are interested.

Regards

- --
Gianluigi Tiesi <sherpya [at] netfarm>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+aoK3UE5cRfnO04RAmwjAKCYTeuvhI1n2vwOYc7wnDL0xvEELQCgsLk1
k0P9zsOc5OZFUOXPzR0/ghE=
=R6hk
-----END PGP SIGNATURE-----
Attachments: ole2_namefix.diff (0.79 KB)


edwintorok at gmail

Mar 15, 2007, 2:31 PM

Post #2 of 3 (1106 views)
Permalink
Re: [PATCH] workaround to invalid names in ole2 [In reply to]

On 3/15/07, Gianluigi Tiesi <sherpya [at] netfarm> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I've already posted something about this, but there was a problem
> when detecting real ole2 containers like office document, this
> new patch should avoid the regression.
> When a file is extracted first it try to create a file
> that will fail if the name is invalid (I've seen names with >),
> then in this case it will generate a random name.

We already got cli_sanitise_filename().

--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


sherpya at netfarm

Mar 15, 2007, 5:06 PM

Post #3 of 3 (1098 views)
Permalink
Re: [PATCH] workaround to invalid names in ole2 [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Török Edvin wrote:
> On 3/15/07, Gianluigi Tiesi <sherpya [at] netfarm> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I've already posted something about this, but there was a problem
>> when detecting real ole2 containers like office document, this
>> new patch should avoid the regression.
>> When a file is extracted first it try to create a file
>> that will fail if the name is invalid (I've seen names with >),
>> then in this case it will generate a random name.
>
> We already got cli_sanitise_filename().
>
yes but it doesn't cover duplicated names, a file can overwrite a
previous one with the same name


- --
Gianluigi Tiesi <sherpya [at] netfarm>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+d+H3UE5cRfnO04RAorcAJ9wvYD1GJrqXnX6Yv080bAnIDsd6QCgh2HA
kAoIh3CGynvZ9j9Qy4q8wgM=
=2Arc
-----END PGP SIGNATURE-----
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

ClamAV devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.