From: ludo@gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: guix-devel@gnu.org
Subject: Re: zipbomb handling should not be done in url-fetch/zipbomb
Date: Wed, 21 Jun 2017 12:45:10 +0200 [thread overview]
Message-ID: <87r2ydipqh.fsf@gnu.org> (raw)
In-Reply-To: <fd9f3d8a.AEEAMJKpYXYAAAAAAAAAAAOtZhgAAAACwQwAAAAAAAW9WABZSW5R@mailjet.com> (Arun Isaac's message of "Wed, 21 Jun 2017 00:19:44 +0530")
Arun Isaac <arunisaac@systemreboot.net> skribis:
>>> * Proposal
>>>
>>> zip bomb (zip archives without a top level directory) handling should
>>> not be done in `url-fetch/zipbomb'. It should be implemented as a
>>> boolean argument to the `unpack' phase.
>>
>> I guess the Boolean argument would determine whether to do (chdir
>> (first-subdirectory ".")), right?
>>
>> Unfortunately that’s not enough for the cases where an origin has
>> patches or a snippet, because that code also assumes there’s only one
>> subdirectory (see ‘patch-and-repack’ in (guix packages)).
>
> Ah, I didn't think of that.
>
>> Perhaps the right fix would be to fix ‘patch-and-repack’ somehow.
>
> Unfortunately, I don't know what that fix would look like. :-( Perhaps
> `patch-and-repack' should somehow autodetect whether the archive is a
> bomb or not. Do you think that is a good solution? It sounds
> overcomplicated to me.
Yeah, I don’t really know either. It could certainly detect that
unpacking created more than one file, and maybe it could automatically
create a directory and move everything there.
It’s a bit complicated for the occasional tarbomb, indeed…
> Or, we can just let this matter rest as it is not too important.
Maybe!
Thanks,
Ludo’.
prev parent reply other threads:[~2017-06-21 10:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 9:45 zipbomb handling should not be done in url-fetch/zipbomb Arun Isaac
2017-06-17 20:13 ` Ludovic Courtès
2017-06-18 22:21 ` Eric Bavier
2017-06-20 18:49 ` Arun Isaac
2017-06-21 10:45 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r2ydipqh.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=arunisaac@systemreboot.net \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).