4 ms·
I'd love to see information about the actual security value of these changes. A ton are just adjusting to KNF. http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-sr
by jgrahamc 13y ago
I'd love to see information about the actual security value of these changes. A ton are just adjusting to KNF.
http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-src/log/lib/libssl http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-src/log/lib/li...
- danrik 13y agoSpeaking as someone who spends a big chunk of his working life auditing others code, having a consistent style makes it a lot easier to spot problems.
- jgrahamc 13y agoBut isn't what's happening here a change to the coding style to match the style used by BSD? That might be fun for BSD coders, but is that actually helping improve the OpenSSL code?
- clarry 13y agoIt might not help upstream OpenSSL, unless they keep an eye out for the bug fixes. Consider OpenBSD the upstream for this new fork.
- mfwoods 13y agoI don't think they intend to contribute back to the original OpenSSL code base, but see this as a OpenBSD only fork.
- feld 13y agoman style http://www.openbsd.org/cgi-bin/man.cgi?query=style&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html http://www.openbsd.org/cgi-bin/man.cgi?query=style&apropos=0...
- gkya 13y agoWell, that'd be useless to move from tabs to spaces or from n spaces to m spaces in this context, but as far as I've observed, OpenSSL codebase uses the unconventional Whitesmiths style [1][2][3], which might be a burden on the developers to navigate. [1] http://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style http://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style [2] http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/crypto/sha/sha.c?rev=1.1.1.2;content-type=text%2Fplain http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/cry... [3] http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/crypto/dsa/dsa_depr.c?rev=1.1.1.1;content-type=text%2Fplain http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/cry... edit: formatting
- lambda 13y agoThat's pretty disappointing; a big formatting change like that means that it'll increase friction of pulling fixes and changes between the two versions.
- feld 13y agoBut it makes it readable, which makes it easier to find bugs. This is vastly more important.
- clarry 13y agoThis, very much. Normally I try to avoid getting into arguments about style and such, it's just bikeshedding. But if the OpenBSD people are going to clean up, review, audit, fix, improve and maintain this code, it makes all the sense to switch to a style they are used to and comfortable with. It also makes sense to nuke all the junk that gets in the way and which they will not and cannot test because it is not at all relevant to the platform. Besides, the OpenSSL code is a fucking mess.
- kabdib 13y agoAt some point you need to say, "This code is a mess, and pretty much anything we do to it will be an improvement." I spent a couple hours with the OpenSSL source last week, and agree that a major cleanup is necessary. This means - Rip out unused stuff - Rip out stuff that obviously doesn't work - Make big cleanups I've done this in the past with token-level tools to ensure that I wasn't breaking things. OpenSSL desperately needed to have a bunch of garbage removed. It needs good tests, it needs to be slimmed down and made clean so that the code is readable and maintainable. Frankly I wouldn't trust fixes to the old version anyway, given its state.
- lutusp 13y ago> At some point you need to say, "This code is a mess, and pretty much anything we do to it will be an improvement." In software development it's often the case that the first claim is true, but the second isn't. > Frankly I wouldn't trust fixes to the old version anyway, given its state. It will be interesting to see if this get organized and properly funded, given this library's importance to international commerce. > Frankly I wouldn't trust fixes to the old version anyway, given its state. Clean slate! An admirable goal, and clearly the best solution. Let's see if this actually happens.
- clarry 13y agoThere have been a few bugfixes. Some insecure idioms have been corrected, a broken implementation of calloc (seriously, why?) has been replaced with calls to the library function. Some deceiving (and/or just useless) wrappers have been eradicated. More significant is the removal of the built-in RNG and a few hilarious (or sad) questionable "features" relating to its use.
- Wilya 13y agoI don't think the changes they are doing at the moment have much security value. They aren't working on fixing OpenSSL security flaws. They are obliterating all the layers of cross-platform compatibility that make the code more complex, and removing everything OpenBSD isn't likely to use. They are transforming a local copy of openssl that tracks upstream changes to their own fork, that probably won't reunite with the upstream version anytime soon. In the process, they are obviously likely to find some bugs (and they already have fixed one or two harmless ones), but I think they are more interested in building a clean fork for themselves than in fixing the upstream openssl.
- jgrahamc 13y agoBut they are doing stuff like this: 1. Let's remove OPENSSL_cleanse: http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-src/commit/lib/libssl?id=6fec7be36425adfd2b48f3695d24a03f6287d4fe http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-src/commit/lib... 2. Crap. Let's put it back again: http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-src/commit/lib/libssl?id=e51513a6c7d3dd499dd4a8a5767951ccfadab599 http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-src/commit/lib... That plus the 'tone' of the commits makes me wary of these changes.
- clarry 13y agoDid you actually read the second diff you linked? They did not put anything back again. They removed even more junk. It is all deletions. I'm getting tired of all the people who complain about the humour, tone or style in the commit messages. If you have serious concerns, why not read the diffs and comment on the actual changes? This is how real problems get noticed and corrected. But some things were in fact removed and put back again, because it turns out some ports depended on it. Sometimes you just don't notice what a few thousand other applications depend on before you remove some code.
- jgrahamc 13y agoYou're right. I'm wrong about number 2. Mea culpa.
- zokier 13y agoLooks like significant amount of non-stylistic changes too: http://opensslrampage.org/ http://opensslrampage.org/
- peterwwillis 13y agoThe OpenBSD team just want to do it their own way, regardless of the practical value of creating single solutions that work everywhere. OpenSSL was a great idea back when there was no other open crypto library. But now amateur cryptographers are a dime a dozen and anyone can slap together something that just works for them and disregards others. Hence stripping out everything, changing APIs, and enforcing KNF. There's probably no security value to 90% of the changes; they just want conformity to their personal style.
- protomyth 13y agoAs feld, clarry, danrik, etc. have pointed out, having a consistent coding style makes identifying bugs much easier. "regardless of the practical value of creating single solutions that work everywhere" Since these are the same folks who do OpenSSH, I would imagine after the initial work is done, it will probably evolve to be as portable as OpenSSH and the other OpenBSD projects. Also, they are doing many bug fixes as shown on http://opensslrampage.org http://opensslrampage.org
- X-Istence 13y agoThe API's aren't changing... they are keeping API compat. Sure you won't be able to change the PRNG anymore ... but that isn't that big of a deal. This isn't about confirming to their personal style, this is about cleaning the code up so that auditing it is possible.