Skip to content
By using Twitter’s services you agree to our Cookies Use. We and our partners operate globally and use cookies, including for analytics, personalisation, and ads.

This is the legacy version of twitter.com. We will be shutting it down on June 1, 2020. Please switch to a supported browser, or disable the extension which masks your browser. You can see a list of supported browsers in our Help Center.

  • Home Home Home, current page.
  • About

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English UK
    • Español
    • Filipino
    • Français
    • Hrvatski
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Ελληνικά
    • Български език
    • Русский
    • Српски
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in
    Have an account?
    · Forgot password?

    New to Twitter?
    Sign up
colmmacc's profile
Colm MacCárthaigh
Colm MacCárthaigh
Colm MacCárthaigh
@colmmacc

Tweets

Colm MacCárthaigh

@colmmacc

AWS, Apache, Crypto, Irish Music, Haiku, Photography

Seattle
notesfromthesound.com
Joined April 2008

Tweets

  • © 2020 Twitter
  • About
  • Help Center
  • Terms
  • Privacy policy
  • Imprint
  • Cookies
  • Ads info
Dismiss
Previous
Next

Go to a person's profile

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @

Promote this Tweet

Block

  • Tweet with a location

    You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Copy link to Tweet

    Embed this Tweet

    Embed this Video

    Add this Tweet to your website by copying the code below. Learn more

    Add this video to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    By embedding Twitter content in your website or app, you are agreeing to the Twitter Developer Agreement and Developer Policy.

    Preview

    Why you're seeing this ad

    Log in to Twitter

    · Forgot password?
    Don't have an account? Sign up »

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Sign up
    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

     

    Welcome home!

    This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.

    Tweets not working for you?

    Hover over the profile pic and click the Following button to unfollow any account.

    Say a lot with a little

    When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.

    Spread the word

    The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.

    Join the conversation

    Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.

    Learn the latest

    Get instant insight into what people are talking about now.

    Get more of what you love

    Follow more accounts to get instant updates about topics you care about.

    Find what's happening

    See the latest conversations about any topic instantly.

    Never miss a Moment

    Catch up instantly on the best stories happening as they unfold.

    Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
    • Report Tweet
    • Report NetzDG Violation

    Colm MacCárthaigh Retweeted lvh

    Thursday tweet thread time! This one is all about what we do in Amazon s2n to prevent security issues similar to this week's libssh problem.https://twitter.com/lvh/status/1052272548560478208 …

    Colm MacCárthaigh added,

    lvh @lvh
    libssh auth bypass: https://www.libssh.org/2018/10/16/libssh-0-8-4-and-0-7-6-security-and-bugfix-release/ …
    2:15 PM - 18 Oct 2018
    • 199 Retweets
    • 424 Likes
    • Pavlos Ront. Plabon Mahmud _ JaneliaSoul #IAmBold Christoffer Sawicki Matthew S. Wilson Stay Home chetan Mr. Prescott
    5 replies 199 retweets 424 likes
      1. New conversation
      2. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        First and foremost, I don't mean to knock on libssh here or make it seem like libssh is anything other than an awesome project where people volunteer their time and thinking to improving the world's security. We analyze for interesting lessons, not to poke!

        1 reply 1 retweet 37 likes
        Show this thread
      3. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        O.k. let's get into it. So in this libssh bug basically a libssh server (which are rare!) can be coaxed into letting you log in if you send it a message that says "Hey authentication succeeded".

        1 reply 0 retweets 17 likes
        Show this thread
      4. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        This looks silly, and there's been knock knock jokes, but it's actually hard to catch with a code review and it's not an uncommon kind of problem. A few years back there was a similar issue in OpenSSL (and not to knock OpenSSL either!) ...

        1 reply 1 retweet 18 likes
        Show this thread
      5. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        You could send it an out of order "ChangeCipherSuite" message and OpenSSL would skip to the authenticated state for a TLS/SSL connection, bypassing all sorts of important checks. State machines are hard!

        1 reply 2 retweets 25 likes
        Show this thread
      6. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        It's hard to catch these in code reviews because the typical approach is to mix the code that parses messages and the code the proceeds to the next state. For example you might have a parser that handles the first "Hello" message ...

        1 reply 1 retweet 18 likes
        Show this thread
      7. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        before it even runs some piece of code is probably like "hey this is a hello message, call that parser!" and then at the end that parser will have a series of branches that are basically "hey, if I'm in this mode with X enabled, go here next, otherwise go there next".

        1 reply 0 retweets 10 likes
        Show this thread
      8. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        When you're reading the code locally everything makes sense, because you're not thinking of other entry points or things being out of order. There's nothing glaring there.

        1 reply 1 retweet 12 likes
        Show this thread
      9. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        One way to catch these errors is to use a protocol fuzzer; something that sends messages in random orders, tries to jam things up. But those are hard to write ... the messages need to be somewhat valid to get so far, and the combinatorial space to explore can be HUGE.

        1 reply 0 retweets 28 likes
        Show this thread
      10. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        In s2n we do something differently. We borrow a trick first learned from S3's Doug Lawrence, combined with another trick from @signalapp's @trevp__ .... we linearize the state machine into a static table, and we try to negotiate EVERYTHING just once. O.k. what does that mean ...

        1 reply 7 retweets 54 likes
        Show this thread
      11. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        O.k. so rather than having message parsers and generators that can transition states at all, we make them standalone, all they do is parse or generate messages. So how do we know which ones to call and when?

        1 reply 1 retweet 18 likes
        Show this thread
      12. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        We put everything in a table, and use function pointers, see s2n's at:https://github.com/awslabs/s2n/blob/master/tls/s2n_handshake_io.c#L62 …

        2 replies 0 retweets 39 likes
        Show this thread
      13. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        and then we fully linearize every possible valid order of states ... https://github.com/awslabs/s2n/blob/master/tls/s2n_handshake_io.c#L85 …

        1 reply 0 retweets 24 likes
        Show this thread
      14. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        With that approach, when we negotiate what options/modes/extensions you're going to use, we do it just once and handcuff ourselves to the corresponding linearized set of state transitions. That is the only order we will then follow. An out of order message shuts everything down.

        1 reply 0 retweets 23 likes
        Show this thread
      15. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        That makes our state machine itself tiny, it's here: https://github.com/awslabs/s2n/blob/master/tls/s2n_handshake_io.c#L253 … all it does is increment a value! Btw one of our coding tenets is never to mix control flow and message parsing in the same function. Big win here!

        1 reply 1 retweet 39 likes
        Show this thread
      16. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        O.k. so that's the basic approach, but how do we then test it? how do we make sure that all of our valid states are correct? With some help from @galois , we formally verify it! Here's how ...

        1 reply 0 retweets 17 likes
        Show this thread
      17. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        So we have a declarative definition of the valid TLS states that come from the RFC. It's written in Cryptol, and is here: https://github.com/awslabs/s2n/blob/master/tests/saw/spec/rfc-handshake.cry#L134 … now that's done by hand and we have to trust it, it's the "bottom turtle" in the proof, but it's easy to read and review.

        2 replies 1 retweet 34 likes
        Show this thread
      18. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        We then use SAW to map our s2n_handshake C code to something that can be symbolically executed for all possible inputs. Here's the SAW code that does the mapping: https://github.com/awslabs/s2n/blob/master/tests/saw/s2n_handshake_io.saw …

        2 replies 0 retweets 10 likes
        Show this thread
      19. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        So together, these actually check that our handshake code really does all TLS valid state transitions correctly, and only those. We caught bugs when we first added it too! Not a security issue, but it turns out we didn't support an obscure combination of OSCP and resumption.

        1 reply 1 retweet 13 likes
        Show this thread
      20. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        Now my favorite part ... how do we know that the verification itself actually works? We run it on every build, but what does that say?

        1 reply 0 retweets 7 likes
        Show this thread
      21. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        We *also* "verify the verifier" by forcing some negative test cases. We actually patch the code with known errors: https://github.com/awslabs/s2n/tree/master/tests/saw/failure_tests … and check that the formal verification fails! This is super important for checking formal verf btw, and often overlooked.

        2 replies 8 retweets 55 likes
        Show this thread
      22. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        We also do fuzz tests (https://github.com/awslabs/s2n/tree/master/tests/fuzz …) and we have integration tests with other implementations, to check for inter-op.

        2 replies 0 retweets 16 likes
        Show this thread
      23. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        Our goal with tooling is to ensure that we have failsafes beyond code-review. For these state machine type bugs, it actually takes quite a lot! There's a lot more code verifying it than implementing it. It's not surprising that these issues crop up in real world software.

        1 reply 3 retweets 30 likes
        Show this thread
      24. Colm MacCárthaigh‏ @colmmacc 18 Oct 2018
        • Report Tweet
        • Report NetzDG Violation

        Anyway, that's it unless you want to AMA. I'll just ask @threadreaderapp to please unroll this thread!

        5 replies 0 retweets 28 likes
        Show this thread
      25. End of 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.

      Promoted Tweet

      false

      • © 2020 Twitter
      • About
      • Help Center
      • Terms
      • Privacy policy
      • Imprint
      • Cookies
      • Ads info