News for hackers. Stuff that matters.
Re:D-Link publishes code-signing private keys by mistake by AnthonyMouse on Thursday September 17, 2015 @06:15PM (#10236404)
> Scripts used to control compilation and installation != signing keys.

You're referring to "scripts used to control compilation", but how are signing keys not part of the source code? GPLv2 uses a specific definition of source code, "the preferred form of the work for making modifications to it." Don't you have to be arguing that a form not allowing modifications to be used or tested is the "preferred form of the work for making modifications"?

Re:D-Link publishes code-signing private keys by mistake by DannyBee on Monday September 21, 2015 @02:11PM (#10254084)
"" Don't you have to be arguing that a form not allowing modifications to be used or tested is the "preferred form of the work for making modifications"?"

You are trying to take parts out and remove context from them.

I don't have to argue at all about the preferred form, because it very explicitly says what that is: "The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable."

The first two sentences go together. It defines, explicitly, what the preferred form of complete source code for an executable work includes.

So that isn't going to include signing keys unless you want to argue that one of the explicitly enumerated parts includes signing keys.

For years, people have argued back and forth about whether the scripts include data files. The general consensus is "no", because otherwise, it has no differentiable meaning from the other parts.

Re:D-Link publishes code-signing private keys by mistake by MaulingMonkey on Friday September 18, 2015 @12:51AM (#10237521)
Do you check your private GitHub keys into VCS? Your wide definition of "scripts used to control compliation" would seem to include them! My preferred form of making modifications to my software includes uploading them to my GitHub account for code reviews among other things.

I use my GitHub private keys way more often than final code signing keys - be those keys used for as "nefarious" a use as tivoization lock-in, or as benign a use as proving authorship so Windows can tell my executables apart from some asshole's malware better.

During standard development I'm either using temporary, machine-local certificates, or using unsigned code. If that means I need a devkit, or an emulator, or a dongle, or whatever else might be required to iterate that doesn't require the final "publishing" steps, in a well designed system it shouldn't require final publishing certs. Because for security's sake, you'd consider going to such lengths as keeping those code signing certs on a tightly controlled, air gapped machine, to reduce the chance of getting pwned and dealing with cert invalidation. Or worse.

Which makes it a very far cry from being part of your compilation phase in any capacity, nevermind a script used to control it.

Re:D-Link publishes code-signing private keys by mistake by AnthonyMouse on Friday September 18, 2015 @01:22AM (#10237600)
You haven't read what I wrote.

But the "preferred form of the work for making modifications" presumably involves each person using their own github keys (and/or repositories) etc. Anybody can create an account and use github. That is not true in the tivoization case because in that case the only keys that can be used are the original ones.

Re:D-Link publishes code-signing private keys by mistake by MaulingMonkey on Friday September 18, 2015 @03:31AM (#10237922)
> You haven't read what I wrote.

Are you sure? Based on what? I've managed to quote you without the use of copy and paste in that previous post - I'm not sure how I accomplished that if I didn't read what you wrote - so please be more specific.

This also begs the question: Did you read what I wrote?

> But the "preferred form of the work for making modifications" presumably involves each person using their own github keys (and/or repositories) etc.

And the "preferred form of the work for making modifications" also presumably involves each person using their own signing keys (and/or hardware that may not require them) etc.

> Anybody can create an account and use github.

Anyone can buy their own hardware, and compile for it, and install on it. Just don't pick tivoized hardware.

> That is not true in the tivoization case because in that case the only keys that can be used are the original ones.

The source code is not tivoized - hardware is. So don't pick tivoized hardware.

Re:D-Link publishes code-signing private keys by mistake by AnthonyMouse on Friday September 18, 2015 @08:56AM (#10238877)
> Are you sure? Based on what? I've managed to quote you without the use of copy and paste in that previous post - I'm not sure how I accomplished that if I didn't read what you wrote - so please be more specific.

You're still talking about "scripts used to control compliation" when my point was that it doesn't need to be that if it falls under the definition of source code proper.

> And the "preferred form of the work for making modifications" also presumably involves each person using their own signing keys (and/or hardware that may not require them) etc.

Which works perfectly well up to exactly the point where the person distributing the software delivers it on hardware that does require signing keys and doesn't allow the user/owner to use their own keys. Then they need yours because you prevented them from using their own.

> The source code is not tivoized - hardware is. So don't pick tivoized hardware.

The hardware is being chosen by the person distributing it with GPL software.

Re:D-Link publishes code-signing private keys by mistake by MaulingMonkey on Saturday September 19, 2015 @02:43AM (#10243524)
> You're still talking about "scripts used to control compliation" when my point was that it doesn't need to be that if it falls under the definition of source code proper.

Ahh. Expanding the definition of source code enough to include code signing keys would have also put them into the (sub)category of "scripts used to control compilation and installation" in my mind, making the distinction moot.

It's not moot in the context of the specific point you intended, of course, and which you've now provided, which I thank you for.

> Which works perfectly well up to exactly the point where the person distributing the software delivers it on hardware that does require signing keys and doesn't allow the user/owner to use their own keys.

Which works perfectly well up to exactly the point where the person distributing the software delivers it on hardware (my VCS server) that does require VCS keys and doesn't allow the user/owner to use their own keys.

> The hardware is being chosen by the person distributing it with GPL software.

...and by the person purchasing the product that has the GPL software in it, by choosing to buy that product.

Re:D-Link publishes code-signing private keys by mistake by AnthonyMouse on Saturday September 19, 2015 @03:28PM (#10245294)
> Which works perfectly well up to exactly the point where the person distributing the software delivers it on hardware (my VCS server) that does require VCS keys and doesn't allow the user/owner to use their own keys.

You distribute your software by conveying the VCS server hardware to the customer?

> ...and by the person purchasing the product that has the GPL software in it, by choosing to buy that product.

All GPL licensees have the rights the license grants them, not just the ones who buy or don't buy specific hardware. What good is the license at all if distributors can just say "I'm not doing that part, if you don't like it buy from somebody else"? And what if they all do that, or nobody else makes equivalent hardware?

Re:D-Link publishes code-signing private keys by mistake by tptacek on Friday September 18, 2015 @08:11AM (#10238686)
In actual fact, on many (perhaps most) platforms for which code must be signed, the developers on those platforms don't have to bother with code signing to develop and test their own code; it's stubbed out in the development environment.

So even a reaching definition of "preferred form for modifications" doesn't hit signing keys, just like "preferred form" of a Rails app doesn't include your EC2 credentials.

Re:D-Link publishes code-signing private keys by mistake by mindslight on Friday September 18, 2015 @03:37PM (#10241569)
"modification" applies specifically to the code as is installed and shipped.

Picture the scenario at the manufacturer where one developer is being tasked with creating a new feature using a consumer unit fresh off the line, for a business demo. What resources do they utilize in the course of doing this? This is the company's "preferred form" of the source tree for modifying an as-shipped device, and is what needs to be made public.

The company could supply a firmware update to overwrite the bootloader and stub out signature checking, if that is what makes sense. Or a well-specified description to use JTAG to do the same. Or perhaps they don't actually care about security and 'make dist' creates an installable image.

The thing is, all of these arguments ("preferred form for modification", the key being part of the installation script, code+signature being the executable work) seem like uphill battles when trying to show the manufacturer is violating them in an informal forum like HN.

But the intent and spirit of the license is straightforward and even spelled out in the preamble! "Our General Public Licenses are designed to make sure ... you can change the software". Fulling these goals is the entire point of the contract and only consideration for receiving a license. So the manufacturer is actually the party that must work to show how what they're releasing actually fulfills the specific terms.

Re:D-Link publishes code-signing private keys by mistake by AnthonyMouse on Friday September 18, 2015 @08:46AM (#10238819)
> In actual fact, on many (perhaps most) platforms for which code must be signed, the developers on those platforms don't have to bother with code signing to develop and test their own code; it's stubbed out in the development environment.

What is the relevance of that supposed to be? You can put any part of the development process on any number of different computers or distribute the work between different developers however you like. And the relevant "preferred form for modifications" is presumably the form the user uses to make modifications to the device delivered to the user in any event.

> So even a reaching definition of "preferred form for modifications" doesn't hit signing keys, just like "preferred form" of a Rails app doesn't include your EC2 credentials.

Why wouldn't it include your EC2 credentials (or other root access to the instance) if conveying an EC2 instance to the customer is how the customer receives the software from you? But now you're wading into the SaaS vs. software distribution ambiguity which has nothing to do with the case where you've bought a physical device with the software on it.