<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rspamd.git/src/lua/lua_archive.c, branch master</title>
<subtitle>rspamd</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/atom/src/lua/lua_archive.c?h=master</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/atom/src/lua/lua_archive.c?h=master'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/'/>
<updated>2026-11-11T14:18:54Z</updated>
<entry>
<title>[Fix] Bound archive.unpack when no limit is given</title>
<updated>2026-11-11T14:18:54Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2026-11-11T14:18:54Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=a4b78a065fc1b6c7d3664841b368c97da5830789'/>
<id>urn:sha1:a4b78a065fc1b6c7d3664841b368c97da5830789</id>
<content type='text'>
All the limits of `archive.unpack` were off unless set, and
the only caller in the tree sets them. Without options the
output is now limited to 1 GiB and the headers to a million;
zero still means no limit.

The filters are the ones the library does itself: "all" of
them includes those that run a program of the system (grzip,
lrzip, lzop) on the data.

A number as a key of `files` was converted to a string in
place while the table was walked, which breaks `lua_next`.
</content>
</entry>
<entry>
<title>[Feature] Let archive.unpack match names without the case</title>
<updated>2026-11-10T22:57:57Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2026-11-10T22:57:57Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=cd4e293eee918afed11d6df013e30cc01123bec1'/>
<id>urn:sha1:cd4e293eee918afed11d6df013e30cc01123bec1</id>
<content type='text'>
With `ignore_case` the names in `files` select the members
whatever the case of their ASCII letters, as the names of the
parts of an OOXML package are matched by the applications.
</content>
</entry>
<entry>
<title>[Fix] Do not look for an OOXML package in a packed stream</title>
<updated>2026-11-10T21:21:48Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2026-11-10T21:21:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=9487caa407c3842937c20408192906ac217e5733'/>
<id>urn:sha1:9487caa407c3842937c20408192906ac217e5733</id>
<content type='text'>
`archive.unpack` reads an archive through any filter that
libarchive knows, so a zip inside an xz or bzip2 stream passed
for a package. Such a stream cannot be seeked: it is
decompressed in full to walk over the members, skipped ones
included, with no limit on them and no deadline. A message of
14K made the worker decompress 48M.

The new `filters = false` option refuses a wrapped archive,
and the OOXML handler sets it: a package is a plain zip.
</content>
</entry>
<entry>
<title>[Fix] archives: harden rar, 7z and libarchive parsing</title>
<updated>2026-09-23T07:50:06Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2026-09-23T07:49:10Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=b7e9a58357d93fa7bc266f657f43aa921af097b6'/>
<id>urn:sha1:b7e9a58357d93fa7bc266f657f43aa921af097b6</id>
<content type='text'>
- rar4: check the block type byte is there before reading it
- 7z: bound the names property by its declared size before reading the
  external flag and scanning names
- 7z: allow each streams info section once, a repeated substreams
  section allocated a folders sized array again each time
- archive.unpack: report a header read error as truncation, a warning
  still returns a usable entry
- archive.unpack: check the deadline while reading a member too
- html: keep the data image descriptor in the pool, the parsed image
  keeps a pointer to it
</content>
</entry>
<entry>
<title>[Fix] Bound OOXML processing resources</title>
<updated>2026-08-29T16:43:10Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2026-08-29T16:43:10Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=31a9833ba18eb3e46e59ac4368b3b23c8a63f980'/>
<id>urn:sha1:31a9833ba18eb3e46e59ac4368b3b23c8a63f980</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[Feature] Add bounded DOCX content extraction</title>
<updated>2026-08-28T13:44:50Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2026-08-28T13:44:50Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=c95a2f2babccd2855db82851f467ec02437fe5e4'/>
<id>urn:sha1:c95a2f2babccd2855db82851f467ec02437fe5e4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[Feature] lua_archive: extraction limits vs zip bombs</title>
<updated>2026-06-19T09:38:05Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2026-06-19T09:37:44Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=980d962b0201c340ca8c49a20b4fadee18490c5f'/>
<id>urn:sha1:980d962b0201c340ca8c49a20b4fadee18490c5f</id>
<content type='text'>
archive.unpack/unzip/untar read whole members into memory via
libarchive, so a tiny hostile archive could expand to gigabytes
(OOM). Add an optional opts table that caps extraction, enforced
while reading so memory stays bounded:

  - max_output     total uncompressed bytes across all members
  - max_file_size  per-member uncompressed cap (truncated at cap)
  - max_files      member count cap
  - max_ratio      per-member uncompressed/compressed ratio cap

Ratio uses real compressed bytes consumed via
archive_filter_bytes(a, -1), checked per chunk above a 64 KiB
floor, so a bomb is stopped early even with no size cap set. All
limits are opt-in (0/absent = unlimited), preserving the previous
behaviour. A second boolean return flags truncation so a capped
extraction is never mistaken for a complete one.
</content>
</entry>
<entry>
<title>[Project] Switch to libarchive for encrypted zip archives</title>
<updated>2025-09-23T19:34:38Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2025-09-23T19:34:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=1e4089b1f1894db62e96462f4ddee54fa4897238'/>
<id>urn:sha1:1e4089b1f1894db62e96462f4ddee54fa4897238</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[Project] Switch to ZipCrypto for encrypted zip archives (AES is not supported by libarchive)</title>
<updated>2025-09-23T17:18:03Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2025-09-23T17:18:03Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=fe89de187a27bccb8f0ae9a549420cb4358c614b'/>
<id>urn:sha1:fe89de187a27bccb8f0ae9a549420cb4358c614b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[Minor] Some tests fixes</title>
<updated>2025-09-23T10:56:54Z</updated>
<author>
<name>Vsevolod Stakhov</name>
<email>vsevolod@rspamd.com</email>
</author>
<published>2025-09-23T10:56:54Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/rspamd.git/commit/?id=e4e6ed7151ea07d308d46cd72b09641d324e7cbd'/>
<id>urn:sha1:e4e6ed7151ea07d308d46cd72b09641d324e7cbd</id>
<content type='text'>
</content>
</entry>
</feed>
