* bug#19479: Copyright issue (was: Re: bug#19479: Package manager vulnerable)
[not found] ` <iKceXlDJbawOYczzAAZidbwV0Sq68CGaBNzyymlTMR2@local>
@ 2015-01-09 6:59 ` Kelly Dean
2015-01-09 15:17 ` bug#19479: Copyright issue Stefan Monnier
[not found] ` <rt-3.4.5-910-1421783402-547.973211-5-0@rt.gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: Kelly Dean @ 2015-01-09 6:59 UTC (permalink / raw)
To: Stefan Monnier; +Cc: assign, 19479, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 4230 bytes --]
Stefan Monnier wrote:
>>> You're one of the very rare oddballs who can't
>>> be bothered to sign a trivial document to get this out of the way
>> That's not true. I offered to sign a document saying my work is PD.
>
> I didn't mean "a trivial document" in the sense "any trivial document",
> but rather "the particular trivial document that everybody else signed".
The FSF doesn't have just one document for contributors; it has multiples, three of which I linked to in my previous message, and at least two more that are for assignment instead of disclaimer (one for only past contributions, and one for past and future contributions).
More than two years ago, I asked the copyright clerk to send me a disclaimer form to sign. He refused. This is the _only_ reason that the FSF doesn't already have a disclaimer on file for me.
If I sign an assignment document (i.e. saying that I own intellectual property for my work and that I'm assigning that ownership to the FSF), then I would just be committing perjury, because I don't own PD works. Nothing I sign can remove anything from the public domain.
Again, please don't conflate two separate issues:
0. The FSF is refusing new PD code in Emacs. (I would be happy to learn that I'm mistaken about this.)
1. My code is PD. (In case the FSF disputes this fact, I'm attaching a signed document to establish it.)
Because the clerk refused to send me anything to sign that would establish #1 to the FSF's satisfaction, today I printed, signed, and scanned the attached document based on the disclaimer forms the FSF has published, to make it abundantly clear that my work is PD and that the FSF is free to use my work with no legal restrictions whatsoever.
I'm also CCing it to assign@gnu.org, even though at this point I assume the clerk will come up with some excuse to reject it.
If the clerk feels this doesn't make #1 clear enough, then please tell me what needs to change. Even better, send me the exact disclaimer form you want me to sign, which I asked for in the first place.
I repeat: nothing I sign can remove anything from the public domain. So nothing I sign can assign to the FSF ownership of my work; if assignment is what the FSF insists on, then it's asking for the impossible.
The attached document is to establish #1 to the FSF's satisfaction. The FSF alone has the ability to solve #0; it has nothing to do with me.
Here's the text of the attached document:
This document is derived from the following sources:
http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/Copyright/disclaim.manual
http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/Copyright/disclaim.program
I, Kelly Dean, American citizen and resident, hereby disclaim all patent, copyright, and all other forms of intellectual property ownership of and interest in all of my patches, software manuals, software programs, source code, documentation, revisions thereof, and all other works, past, present, and future, that I sent or will send to the emacs-devel@gnu.org or bug-gnu-emacs@gnu.org mailing lists, to 19479@debbugs.gnu.org, to any other mailing list or email address at gnu.org or any subdomain thereof, or to any developer or maintainer of GNU Emacs or any other GNU software, from my previous (no longer active) email address of kellydeanch@yahoo.com, my current email address of kelly@prtime.org, or any other email address.
I affirm that I have no other proprietary interest that would undermine this release, and will do nothing to undermine it in the future. I represent that all of the aforementioned works are my own and not a copy of someone else's work, except where sources are cited. Patches include citations and partial copies of the works to which the patches apply.
I created all of the works exclusively on my own time. They are not works made for hire, and there's no educational institution, employer, or any other organization or person who owns them. I do not have any agreement with any person or organization saying he or it owns programs I write, and I did not have any such agreement when I created any of the aforementioned works.
All of the works are permanently and irrevocably in the public domain.
Kelly Dean
kelly@prtime.org
January 8, 2015
[-- Attachment #2: gnu-disclaimer.pdf --]
[-- Type: application/pdf, Size: 29848 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19479: Copyright issue
2015-01-09 6:59 ` bug#19479: Copyright issue (was: Re: bug#19479: Package manager vulnerable) Kelly Dean
@ 2015-01-09 15:17 ` Stefan Monnier
2015-01-09 15:29 ` David Kastrup
2015-01-09 19:57 ` Kelly Dean
[not found] ` <rt-3.4.5-910-1421783402-547.973211-5-0@rt.gnu.org>
1 sibling, 2 replies; 15+ messages in thread
From: Stefan Monnier @ 2015-01-09 15:17 UTC (permalink / raw)
To: Kelly Dean; +Cc: assign, 19479, emacs-devel
> 1. My code is PD. (In case the FSF disputes this fact, I'm attaching
> a signed document to establish it.)
It can't be PD. You're simply confused about it. It will only be PD 75
years after your death (or something like that). Until then, all you
can do is sign paperworks, and currently for Emacs contributions we
require this paperwork to be a copyright assignment rather than
a disclaimer.
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: bug#19479: Copyright issue
2015-01-09 15:17 ` bug#19479: Copyright issue Stefan Monnier
@ 2015-01-09 15:29 ` David Kastrup
2015-01-09 19:57 ` Kelly Dean
1 sibling, 0 replies; 15+ messages in thread
From: David Kastrup @ 2015-01-09 15:29 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Kelly Dean, emacs-devel, assign, 19479
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> 1. My code is PD. (In case the FSF disputes this fact, I'm attaching
>> a signed document to establish it.)
>
> It can't be PD. You're simply confused about it. It will only be PD
> 75 years after your death (or something like that).
If I remember correctly, if he is living in the U.S.A. and registers a
specific work with the U.S. copyright office as being released by him
into the public domain, then the work will indeed be in the public
domain within the U.S.A. We need to bother with more than the U.S.A.,
however, and one can only register specific works which means it is not
possible to register them before they are even created.
--
David Kastrup
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Copyright issue
2015-01-09 15:17 ` bug#19479: Copyright issue Stefan Monnier
2015-01-09 15:29 ` David Kastrup
@ 2015-01-09 19:57 ` Kelly Dean
2015-01-09 20:24 ` bug#19479: " Glenn Morris
1 sibling, 1 reply; 15+ messages in thread
From: Kelly Dean @ 2015-01-09 19:57 UTC (permalink / raw)
To: Stefan Monnier; +Cc: assign, 19479, emacs-devel
Stefan Monnier wrote:
>> 1. My code is PD. (In case the FSF disputes this fact, I'm attaching
>> a signed document to establish it.)
>
> It can't be PD. You're simply confused about it. It will only be PD 75
> years after your death (or something like that). Until then, all you
> can do is sign paperworks, and currently for Emacs contributions we
> require this paperwork to be a copyright assignment rather than
> a disclaimer.
GNU's own website says it can be PD. The documents at the three links I sent you start with:
⌜I'd like to ask you to sign a disclaimer for the manual, thus putting it in the public domain.⌝
⌜I'd like to ask you to sign a disclaimer for the program, thus putting it in the public domain.⌝
⌜I'd like to ask you to sign a disclaimer for your changes, thus putting them in the public domain.⌝
Notice the ⌜thus putting them in the public domain⌝.
Also, do you claim that SQLite is not PD? The author, Richard Hipp, says it's PD, and the many millions of users of SQLite, including many major companies with lots of copyright lawyers, accept the legal fact that it's PD. And Richard Hipp is not dead.
Also, do you claim that feedmail.el is not PD? The first lines of it are:
;;; feedmail.el --- assist other email packages to massage outgoing messages
;;; This file is in the public domain.
;; This file is part of GNU Emacs.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: bug#19479: Copyright issue
2015-01-09 19:57 ` Kelly Dean
@ 2015-01-09 20:24 ` Glenn Morris
2015-01-09 20:32 ` Glenn Morris
0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2015-01-09 20:24 UTC (permalink / raw)
To: Kelly Dean; +Cc: assign, 19479, Stefan Monnier, emacs-devel
I must say, that it was not my impression that disclaimers were not
accaptable for Emacs. Only that the FSF does not offer a "past and
future" option for disclaimers like it does for assignments, so a new
disclaimer would have to be completed for every new change. I thought
this was not worth bothering with, so I advised you not to send more patches.
But I certainly don't know, I just go with whatever assign@gnu says.
I don't see much point discussing this on emacs-devel. None of us are
lawyers so our opinions are pretty irrelevant. We need to wait and see
what assign@gnu says.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: bug#19479: Copyright issue
2015-01-09 20:24 ` bug#19479: " Glenn Morris
@ 2015-01-09 20:32 ` Glenn Morris
0 siblings, 0 replies; 15+ messages in thread
From: Glenn Morris @ 2015-01-09 20:32 UTC (permalink / raw)
To: Kelly Dean; +Cc: 19479, assign, emacs-devel
Glenn Morris wrote:
> I must say, that it was not my impression that disclaimers were not
> accaptable for Emacs. Only that the FSF does not offer a "past and
> future" option for disclaimers like it does for assignments, so a new
> disclaimer would have to be completed for every new change. I thought
> this was not worth bothering with, so I advised you not to send more patches.
PS but yes, for a non-trivial security issue like 19479 it did seem
worth it to me, so I was on the verge of saying, would you be willing to
complete a disclaimer for this change. But then Stefan said disclaimers
were not viable, so I didn't bother to say it.
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <rt-3.4.5-910-1421783402-547.973211-5-0@rt.gnu.org>]
* Emacs package manager vulnerable to replay attacks
@ 2014-12-30 10:42 Kelly Dean
2014-12-30 11:45 ` Ivan Shmakov
0 siblings, 1 reply; 15+ messages in thread
From: Kelly Dean @ 2014-12-30 10:42 UTC (permalink / raw)
To: emacs-devel
Remove your ~/.emacs.d/elpa/ directory, and start 24.4.
Use the default of '(("gnu" . "http://elpa.gnu.org/packages/")) for package-archives.
Do M-x list-packages, which will download the archive metadata (http://elpa.gnu.org/packages/archive-contents and its sig file), verify the sig, and generate archive-contents.signed which indicates successful verification.
Then:
mkdir /tmp/localarch; cd /tmp/localarch
cp ~/.emacs.d/elpa/archives/gnu/* . # archive-contents and archive-contents.signed
wget http://elpa.gnu.org/packages/undo-tree-0.6.5.el # Currently latest in elpa
wget http://elpa.gnu.org/packages/undo-tree-0.6.5.el.sig
Now in Emacs, do (setq package-archives '(("gnu" . "/tmp/localarch/")))
Undo-tree 0.6.7 doesn't exist yet, but let's pretend that it does, and it fixes a hypothetical security vulnerability in 0.6.5, and the update has been uploaded to elpa. (Skipping 0.6.6 for this example since it does exist, just not in elpa.)
To simulate this, edit /tmp/localarch/archive-contents, find the entry for undo-tree, and change the (0 6 5) to (0 6 7). Your modified file will no longer verify with http://elpa.gnu.org/packages/archive-contents.sig, but that's ok since you already have /tmp/localarch/archive-contents.signed.
Now, to simulate a package replay attack, rename undo-tree-0.6.5.el to undo-tree-0.6.7.el, and undo-tree-0.6.5.el.sig to undo-tree-0.6.7.el.sig. Then do M-x list-packages again, then install undo-tree 0.6.7. It installs successfully, meaning you've tricked Emacs into installing the vulnerable version of the package even though archive-contents lists the fixed version.
For a live attack, first retrieve all packages and their sig files from elpa, then wait for a vulnerability to be discovered and fixed in one of them, e.g. undo-tree 0.6.5.
Allow your victim to run list-packages to download the new archive-contents (which lists the fixed undo-tree 0.6.7) and to verify it using the new archive-contents.sig.
Then when he tries to download undo-tree-0.6.7.el and undo-tree-0.6.7.el.sig, intercept his connection and give him the content of undo-tree-0.6.5.el and undo-tree-0.6.5.el.sig, so that his Emacs saves the old content using the new names.
His Emacs will successfully verify the signature because it is authentic; you retrieved authentic (but now stale) packages and signatures in your first step. His Emacs will then install the stale package because the version number embedded in the filename matches the version number specified in the new archive-contents file.
The attack also works for already-installed packages when new versions are published; you can deliver stale data when the victim tries to upgrade.
To solve the problem above, simply include a hash of the package content in the package's record in archive-contents, rather than only including the package name and version number in that file as Emacs currently does. This solution also happens to make per-package signatures from the elpa key superfluous, so you can remove that feature from Emacs and remove those signature files from elpa for the sake of simplicity, and use the elpa key only to sign the archive-contents file.
(Of course, per-commit (not just per-package) signatures from authors would still be useful, so that users don't have to trust the elpa keyholder alone, but that's a separate issue. Emacs should barf if a package hash doesn't verify, regardless of whether any signatures verify.)
Package replay attacks could be prevented without putting hashes in archive-contents, by instead verifying that the version number listed in archive-contents matches the version number listed in the package itself, if version numbers were never reused for different versions of packages. But there is at least one package (undo-tree) that does re-use version numbers, so hashes are still necessary. Hashes also prevent elpa itself from reusing version numbers; forcing elpa to issue a new archive-contents whenever it lists a new version of any package makes it more conspicuous that something changed, and making the historical record clear closes off one particular method of attack if the elpa key is compromised.
After the problem of package replay attacks is solved, you can still attack by replaying not only packages, but also the metadata (i.e. the archive-contents and archive-contents.sig files). To solve this problem, include a timestamp of archive-contents in that file itself (so that the signature depends on the timestamp), and have Emacs ignore any new archive-contents that's older than the latest valid one that Emacs has already seen or is older than some specified limit (IIRC Debian's apt-get uses a 10-day limit).
For details on replay attacks, see the 2008 publication
https://www.cs.arizona.edu/stork/packagemanagersecurity/attacks-on-package-managers.html
Another attack is the endless-data attack; I haven't checked whether Emacs is vulnerable. See
https://www.cs.arizona.edu/stork/packagemanagersecurity/otherattacks.html
But since Emacs signs its repository metadata, it appears it is not vulnerable to any of the other attacks described on that page.
In addition to recording hashes, also record the length of the content; it's convenient for early detection of endless-data attacks and of misconfigurations.
One final feature that isn't necessary for preventing any of the vulnerabilities above, but still is helpful to make the historical record even more clear, is to include in each version of archive-contents a hash (and length) of the previous version of that file. This further constrains an attacker who has compromised the elpa key; he can still launch attacks, but it's harder to keep the attacks secret for very long, since he's forced to cause a fork in what's supposed to be a linear hash chain.
Fortunately, all four of these features (package hashes, content length, archive timestamps, and archive hash chaining) are straightforward to implement.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Emacs package manager vulnerable to replay attacks
2014-12-30 10:42 Emacs package manager vulnerable to replay attacks Kelly Dean
@ 2014-12-30 11:45 ` Ivan Shmakov
[not found] ` <F8kXGdneKQWh6B82cOwdrCdBAdO1h3o9WXOqLmHuB8T@local>
0 siblings, 1 reply; 15+ messages in thread
From: Ivan Shmakov @ 2014-12-30 11:45 UTC (permalink / raw)
To: emacs-devel
>>>>> Kelly Dean <kelly@prtime.org> writes:
[…]
> To solve this problem, include a timestamp of archive-contents in
> that file itself (so that the signature depends on the timestamp),
> and have Emacs ignore any new archive-contents that's older than the
> latest valid one that Emacs has already seen or is older than some
> specified limit (IIRC Debian's apt-get uses a 10-day limit).
Debian uses an explicit expiration date, as set in the InRelease
(or Release) file. Consider, e. g., [1]:
Date: Tue, 30 Dec 2014 08:52:15 UTC
Valid-Until: Tue, 06 Jan 2015 08:52:15 UTC
For stable releases, Valid-Until: isn’t used (AIUI) [2]; perhaps
then a fall back value of some kind is used.
[1] http://http.debian.net/debian/dists/jessie/InRelease
[2] http://http.debian.net/debian/dists/wheezy/InRelease
[…]
> Fortunately, all four of these features (package hashes, content
> length, archive timestamps, and archive hash chaining) are
> straightforward to implement.
Well, thanks for the heads-up, but could you please file these
as actual Emacs bug reports, perhaps even separate ones? I’d
then try to suggest patches within the next few days. (Not that
I’m the only person who could do that, anyway.)
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-09-02 12:24 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <jwv4ms03cj3.fsf-monnier+emacsbugs@gnu.org>
[not found] ` <quFzgVhBDz7zhUp0lS56OK32kQQjWsi4jSGZeullV6K@local>
[not found] ` <iKceXlDJbawOYczzAAZidbwV0Sq68CGaBNzyymlTMR2@local>
2015-01-09 6:59 ` bug#19479: Copyright issue (was: Re: bug#19479: Package manager vulnerable) Kelly Dean
2015-01-09 15:17 ` bug#19479: Copyright issue Stefan Monnier
2015-01-09 15:29 ` David Kastrup
2015-01-09 19:57 ` Kelly Dean
2015-01-09 20:24 ` bug#19479: " Glenn Morris
2015-01-09 20:32 ` Glenn Morris
[not found] ` <rt-3.4.5-910-1421783402-547.973211-5-0@rt.gnu.org>
[not found] ` <sXpSIlT9bkMLz7zWFLWTjm38mvYqlezH8vXlii5uxqC@local>
2015-02-24 18:11 ` bug#19479: Disclaimer is now on file at FSF Glenn Morris
2015-02-24 23:02 ` Kelly Dean
2015-02-25 21:09 ` Glenn Morris
2017-09-02 12:24 ` Eli Zaretskii
2015-02-25 4:41 ` Vibhav Pant
2015-02-25 5:32 ` Stephen J. Turnbull
2014-12-30 10:42 Emacs package manager vulnerable to replay attacks Kelly Dean
2014-12-30 11:45 ` Ivan Shmakov
[not found] ` <F8kXGdneKQWh6B82cOwdrCdBAdO1h3o9WXOqLmHuB8T@local>
[not found] ` <iHwGTo6KPGu52f1tOLq6Ek7KcZ7r2tufrT1z4GnPndF@local>
2015-02-24 8:47 ` Kelly Dean
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).