View Issue Details

IDProjectCategoryView StatusLast Update
0000003file[All Projects] Generalpublic2018-11-05 18:41
ReportervaloqAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
PlatformLinuxOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000003: Native decompression
DescriptionCurrently file uses external applications to decompress certain file formats before analysing them.
This prevents effective sandboxing via seccomp.

This bug is to collect information and keep track of the progress of implementing all compression formats using libraries

Currently we have the folloging native decompression functions:
uncompressgzipped
uncompresszlib


The following external decompression tools are currently used and need to be implemented using their respective libraries:

gzip
uncompress
bzip2
lzip
xz
lrzip
lz4
zstd


The compression is handled in srv/compress.c
Tagscompression
Attach Tags

Activities

valoq

2018-06-17 14:54

reporter   ~0000001

Information for the xz compression format:

Library:
https://www.7-zip.org/sdk.html

Example implementations:
https://fossies.org/linux/xz/doc/examples/02_decompress.c
https://github.com/lloyd/easylzma

I will start with the xz format as soon as I find the time.

valoq

2018-08-16 15:25

reporter   ~0000063

After looking into it I believe this https://fossies.org/linux/xz/doc/examples/02_decompress.c already contains all the code needed to implement xz decompression in file.

However there are still some issues in compress.c that I do not fully understand, like how the "method" is determined and how we should change it to allow for a number of new compression methods.

There are also some other areas where I do not get the impression compress.c is ready to have new compression algorithms implemented and I don't think I will fix this that easily


@christos: Can you support this by adopting compress.c in a way that adding new compression methods is more easily possible (and comprehensible). That would be a great help.

christos

2018-11-05 18:41

manager   ~0000101

I lot of progress has been made to add native decompression formats in:
https://nxr.netbsd.org/search?q=&project=src&defs=&refs=&path=usr.bin%2Fgzip&hist=
The necessary source code to handle most formats is there.

Add Note

View Status
Note
Upload Files
Maximum size: 2,097 KB

Drop files here to upload (or click)

Issue History

Date Modified Username Field Change
2018-06-17 08:02 valoq New Issue
2018-06-17 08:02 valoq Tag Attached: compression
2018-06-17 14:54 valoq Note Added: 0000001
2018-08-16 15:25 valoq Note Added: 0000063
2018-11-05 18:41 christos Note Added: 0000101