11 ms·
Cryptkeeper sets the same password “p” independently of user input
- baby 10y ago> But later, when I mounted it once again, cryptkeeper said the password is wrong (though, I 100% know, it's true!). Is it a vulnerability if the product wasn't even working in the first place?
- akjainaj 10y agoWhat if you create a folder, encrypt it, and then never bother to mount it again? You'd think it's safe when it isn't.
- Scarblac 10y agoAlso if you create a folder, encrypt it, and then are completely unable to re-mount it because it says the password is wrong. He figured out from the source code that the password was "p", but for many people it'd just mean important data lost.
- baby 10y agoThen you're screwed fucked because you don't know how to decrypt your own data.
- deleted 10y ago[deleted]
- jmedwards 10y ago
- deleted 10y ago[deleted]
- fergie 10y agoHow can you ever know if encryption is working properly?
- adrianN 10y agoSteal very important data from the NSA, encrypt it, wait.
- ddalex 10y agoBut this is certainly not a halting program.... or is it ?
- dogma1138 10y agoRubber hose cryptanalysis, if your adversary has not quarrels using it, make sure that your encryption is not strong enough to mandate employing it.
- adrianN 10y agoFinding out whether your encryption is strong does require some determination.
- yunolisten 10y agosure, let me break out my super computer to crack that for you: https://xkcd.com/538/ https://xkcd.com/538/
- jonathanstrange 10y agoThey will use parallel construction to convict you.
- baby 10y agoStart by trying to decrypt it :o)
- edejong 10y agoTechnically, you'll have to formalize and assert the correctness of (at least) the following components: - All ICs having direct (unlimited) access to memory and/or computation (CPU/DMA/GPU/BIOS) - Boot loader - Operating system - Encryption algorithm - Encryption implementation - User-program used to interface with encryption implementation - Input/output peripherals used for encryption and display - Probably a dozen things I'm forgetting here But that's only the system itself. Obviously, you will need to formalize the relationship of the system with the environment. This means: side-channel attacks, such as timing, electro-magnetic radiation, sound and temperature. Finally, you need to formalize the relationship of the user and whatever is encrypted. The user needs to have an understanding of the limitations of the encrypted channel, the used keys and the algorithms involved: what is the availability, the loss of entropy to attackers and the limitations to what can safely be encrypted?
- pawadu 10y agoThis issue highlights another common problem on FOSS: If I create a small utility "just for fun" and someone includes it in a major distro and then nobody (including myself) touches it for 10 years, who is to blame if there are security (or any other) issues with the software?
- benchaney 10y agoWhoever included it in a major distro is to blame.
- pawadu 10y agoYes, but is there any kind of vetting process in any of the major distros? Does any distro (outside OpenBSD) have a continuous process of re-evaluating included packages?
- madez 10y agoSince quite some time I'm more than annoyed by the unnecessary complexity and difficulty of traditional distributions caused by inconsistent system tools and backwards compatibility with antique things that block modernization and simplification. Do you know whether OpenBSD strives for consistency and throws away stuff when there is a better alternative?
- jlgaddis 10y agoThey replaced OpenSSL with their own LibreSSL and sudo with doas, among others.
- gkya 10y agoThe whole BSD family of operating systems provide far better consistency than the Linux distro universe, as they are the ones to directly maintain the base system's codebase (POSIX utilites, OS-specific utilites, the kernel, the drivers, init system). Linux distros, on the other hand, are just a juxtaposition of software from a plethora of sources.
- mhogomchungu 10y agoThe bug here is probably with encfs and most frontend tools to enc are doing exactly what cryptkeeper is doing. For those who want alternative to cryptkeeper,there is SiriKali[1], next version will be released on Feb 1st and it will have support for OSX. execlp ("encfs", "encfs", "-S", crypt_dir, mount_dir, NULL); That line of code also has a bug as its wrong to pass NULL in C++ to a variadic function. IMHO,usage of NULL in C++ should be strongly discouraged in all cases. [1] https://github.com/mhogomchungu/sirikali https://github.com/mhogomchungu/sirikali
- fnj 10y agoIncorrect. execlp requires a NULL to terminate the argument list. How else would the called function know when to stop processing arguments? To quote the linux man page, "The list of arguments must be terminated by a NULL pointer...".
- deleted 10y ago[deleted]
- merijnv 10y agoThe original paster didn't say that a null pointer was incorrect, merely that using NULL in C++ was. Which, in recent versions of C++ it certainly is. The correct way to specify a null pointer in C++ is 'nullptr', NULL has been deprecated because it's definition '(void*)0' leads to typing issues for templates.
- filmor 10y agoIn C++, `NULL` is defined as a simple 0 without the `void*` cast.
- CJefferson 10y agoNo, that's exactly wrong (in this case). For variadic C functions, you MUST use 0 (or NULL, which is the same as 0). Passing nullptr will case abort() to be called (as is the case whenever you pass a C++ class into a variadic function).
- deleted 10y ago[deleted]
- borplk 10y agoA great example of the falsehood that people often repeat mindlessly about "thousands of eyeballs watching the source".
- nonsince 10y agoIt's actually a great example of why that works, but simultaneously an example of why it's not sufficient
- nine_k 10y agoSee, that user actually watched the source and readily detected the bug. I just wonder if thousands, or hundreds, or at least a dozen eyeballs actually watched this source. I suspect 1-2 pairs of eyeballs would detect the problem if a proper code review was done. Even better, if an automated test existed for this pretty critical piece of code (passing the password around), thousands of eyeballs won't even be needed that badly. I suspect that just too few people actually use this piece of software. If a large org used it, they probably would have tested this, or even audited the code. Anyway, it's great that everyone has access to the code, so the bug was detected by a user. For closed-source software, a ticket like this might linger longer for a developer's attention.
- borplk 10y agoOh if only it was more popular, yeah just like Heartbleed was caught in OpenSSL. My point was the eyeballs argument is often made as a claim about the absence of bugs at the present time. When in fact it simply means "it is possible for people to look at it and find and fix bugs" no more no less. The mere ability does not magically translate to security. And the ability does not automatically imply that it is being done.
- nilssonanders 10y agoThe 'p' it sends is asked for by encfs when setting up a new encrypted folder (not when mounting an existing in encfs). As the comment in the code says, it's for setting the pre-configured "Paranoia" mode (AES, PBKDF2, IV-chaining, etc) in encfs. Bad that it's not checking any results whatsoever when sending stuff.. [1] https://linux.die.net/man/1/encfs https://linux.die.net/man/1/encfs
- TazeTSchnitzel 10y agoYet another example of why command-line interfaces are not safe. Can we start to use something other than arrays of null-terminated strings for input?
- madez 10y agoWhat alternative do you propose?
- TazeTSchnitzel 10y agoI don't have an easy one. If you can do things in-process, a shared library means type safety. But I don't know what the best practice for IPC (which this is essentially a form of) is.
- throwawayish 10y ago- Structured data instead of always somewhat wonky text formats - Request-reply -- Acknowledge stuff. Especially when it's security relevant - For security relevant stuff, don't just silently fail or fall back to some idiot default. Eg. say a command message for setting a password doesn't contain the password field -- then fail the request, don't assume an empty password. (Ie. be liberal about what you accept but not too liberal)
- tinus_hn 10y agoYou shouldn't be liberal at all if security is a concern. You should be strict, use a well defined format and refuse anything that doesn't comply. It isn't difficult to be strict so being liberal is just asking for trouble uselessly.
- lmm 10y agoI propose protocol buffers or equivalent.
- marcosdumay 10y agoThere are some streams of binary data there too... It's not THAT bad. That's why everybody is still using it. But there are many better options, since the CLI, eg. people have created distributable libraries, and network APIs. Yet, changing APIs will break any of them.
- jhdevos 10y ago> It looks as though cryptkeeper makes assumptions about encfs' command-line interface that are no longer valid. This looks like a developer mistaking a command line interface for an API. Unless an (interactive) CL interface is explicitly marked as being an API, and documented in such a way, and regression tests exist to make sure the interface remains backwards-compatible - you should never program against it. Ask for a proper API to access. (edit: formatting)
- mhogomchungu 10y agoIt seems to be,look at documentation for option "-S" here: https://linux.die.net/man/1/encfs https://linux.die.net/man/1/encfs
- makomk 10y agoThere's a warning against using -S for filesystem creation, and the --standard option exists to avoid this problem.
- hueving 10y agoIf you offer a cli with output reasonable to parse as a text stream, assume someone is going to script against it and don't change the args without detecting and warning on the old usage.
- JoshTriplett 10y agoBetter yet, don't offer a CLI as the primary interface; provide a reasonable library to use instead.
- notheguyouthink 10y agoThough, that only works for the language that you use. Other languages may opt to use the CLI as the API
- raverbashing 10y ago
- db48x 10y agoIt should at least have been using `expect`!
- acveilleux 10y agoPlease tell me this isn't a case where Debian has "improved" something crypto and broken it.
- db48x 10y agoThis isn't such a case. Cryptkeeper is old and crufty.
- throwaway7767 10y agoIf you'd read the article you could have answered the question yourself: no, it is not. But why let facts get in the way of some easy karma-whoring?
- ComodoHacker 10y agoWhat bothers me is how it got into 'testing' without any actual testing. This tells something about processes in Debian.
- Sir_Cmpwn 10y agotesting is _for_ testing, you know. Testing happens there, not earlier.
- ChuckMcM 10y agoOuch. For a long time this form of error was the #1 cause of system breakage in SunOS. Someone would go in and change an option or add a 'version' line that would print before the output, or re-order how you typed args, and blam! a bunch of bug reports would come flying in what some program was broken (sometimes commercial programs where now source was available) because they had system('foo bar bletch'); in them somewhere. Very hard to test for as there weren't explicit dependencies and no amount of 'don't count on this output staying the same' warning messages helped.