So how are process exit codes different from shared library return codes different, exactly? What makes it more likely that a stupid user will not check the former but will check the latter? Your argument is valid, but *this bug* is not a good example against processes and pipes
-
-
Replying to @marcan42
No, that’s what you’re not getting. It really is the fragility of the interface that gets you the “It returns content by default, hope you’re smart enough to check the error code, what do you mean nothing did” surprise not surprised dynamic
2 replies 0 retweets 2 likes -
Arguably nobody wanted to add a —just-give-me-what-you-got command line (or —insecure).
1 reply 0 retweets 0 likes -
Replying to @dakami
This is a backwards compatibility argument. gpg was designed with streamability in mind. Sure, you could add an --unbuffered argument, but then you'd break many existing use cases. We both know "secure by default" choices are hard when your public interface is frozen.
2 replies 0 retweets 0 likes -
Replying to @marcan42
They are. You tend to get to reset expectations with a major rev, which we do everywhere else every so often. libssh2 didn’t always exist.
1 reply 0 retweets 2 likes -
Replying to @dakami
This is harder with commandline apps (especially ones as dedicated to backwards compat as gpg) because people don't tend to introduce "gpg2" style "new interface here" breaks. It's a bigger change than library sonames (where you can at least install both at once).
2 replies 0 retweets 0 likes -
But yes, would it be nice for gpg to have a different, more modern interface? Sure. I just don't think blaming this bug on that is fair or reasonable. Something to work towards perhaps, but not a Big Glaring Problem.
3 replies 0 retweets 1 like -
The GnuPG APIs leave much to be desired. This is one of the many traps that developers need to watch out for. It all has Reasons, but today we have a better understanding of secure API design. I'm cautiously optimistic about both
@neopg_ &@nwalfield 'shttps://sequoia-pgp.org/2 replies 0 retweets 1 like -
Sure, I agree. I just don't think *this* is the bug we should be pointing at to make that point. You didn't check retcodes, you dun goofed. Even a Rust API with streaming support won't save you from that one.
2 replies 0 retweets 1 like -
You may not get to return streaming data in any safe API. That might just be a weakness in OpenPGP. You might have to chunk like everything else. Isn’t there chunking support in all this complexity?
2 replies 0 retweets 0 likes
I bet if this were chunked someone would still come up with a convoluted exploit scenario involving concatenating truncated known-plaintext chunked data in unpredictable ways, relying on the same no-error-check client problem. That's the other issue, the out of context decryption
-
-
I mean, that’s part of the equation, malleability is a thing we hammer out of everything. It always takes a few tries.
2 replies 0 retweets 0 likes -
What I like here is we are really trying to find the deep causes here. Because it’s certainly not, like, a typo or a forgotten buffer check.
3 replies 0 retweets 0 likes - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.