Why the Linux kernel is hardly at risk
linux.com
linux.com
So, this is very annoying for people who took kernels tarballs in the past from kernel.org.
Sure, they can regenerate all the tarballs from the git repositories, but this isn't the point for the past actions.
But you're right, as long as they serve tarballs, they should make sure they are safe. I've rolled some kernels myself and always used th e tarballs from kernel.org. Time to practice what I preach an rebuild from git.
Since the attackers had root, what if they served up rootkitted kernels 1% of the time someone downloaded a tar ball?
http://www.schneier.com/blog/archives/2005/02/sha1_broken.ht...
In this case, it is not merely sufficient to find a collision, but to find a collision that is also a valid Git commit, implements a vulnerability, and, ideally, is not immediately obvious at first glance it is a hack (i.e. having kilobytes of garbage data in the commit diff). This is much harder than just finding a random set of bytes that just happens to match the commit SHA-1.
Now, it could be that an organisation like the NSA is sufficiently ahead of public crypto technology that it is capable of not only finding a SHA-1 collision in feasible time, but is also able to craft a malicious Git commit with an identical SHA-1 to a legitimate commit. Inserting such a commit into the Linux source in an appropriate place might result in compromised kernels appearing in commercial products.
But... I kinda doubt anyone is that far ahead, and in any case, it seems extremely risky to try to play such a high-value advantage in a public repository. If someone happens to spot your faked commit, suddenly everyone knows what you are capable of.
So whilst Git would be more secure using SHA-512 or an equivalent, it's currently very unlikely that anyone has the practical capability and will to compromise the kernel's commit log.
also, i find it absolutely typical of the place that HN has become that my original post asking a reasonable, informed question with reference is voted down. you're a bunch of mindless fucking morons.
That said, it was not an unreasonable question to ask, and so I've up-voted you.
What doesn't help is calling everyone "mindless fucking morons" after only one or two down-votes. It's not constructive, and won't get you anywhere. Also: chill. Just because one or two individuals didn't like the tone of your original comment, doesn't mean everyone on HN is out to get you. Well, at least not before you insulted them.
> is their any real analysis
driving some of the downvotes (I did not vote myself).
Given the number of changes coming in every release, more twilight zone experiences increases the number of eyes on the discrepancy.
I am confident in the sanctity of the git-sourced code, thanks to there being multiple version of the same repository around that people are actively working on. I am more worried about all the stuff I might rely on that is not git-sourced.
Suppose a tree well known for rebasing frequently is rebased on kernel.org, and the dev doing it works from the k.org servers (might be possible, since they give shell access).
Then downstream would just see it as yet another rebase, no?
I cannot speak for what they really do over at kernel.org, but if they do rebase their public repositories often (which will break people doing pushes and fetch/merges without some regular communication), yes, it is possible to sneak something in because the public rebase will not be as exceptional.
This is where you tell me that's what they do there and make me scared again. ;)
"Graft points or grafts enable two otherwise different lines of development to be joined together. It works by letting users record fake ancestry information for commits." https://git.wiki.kernel.org/index.php/GraftPoint
Still easy to check though. ;)
It's not entirely impossible but there are far more easier ways of getting malware out there.
If that is the case, going to extra trouble to infect Linux kernel source may well be worth it for the attackers.
In that regard, I guess it could be more "likely" to sneak in a very, very well hidden and cryptic exploit in contributed code.