Git Product home page Git Product logo

Comments (6)

jmuchemb avatar jmuchemb commented on August 28, 2024

(#52)

from babeld.

MisterDA avatar MisterDA commented on August 28, 2024

the goal is not to skip checking but rather ignore when there's no HMAC.

What difference does it make to reject incorrectly-signed packets?

On a side note, my code e314264 is probably wrong. The name babel-mac-verify comes from the Information Model.

from babeld.

jmuchemb avatar jmuchemb commented on August 28, 2024

the goal is not to skip checking but rather ignore when there's no HMAC.

What difference does it make to reject incorrectly-signed packets?

The issue is that correctly-signed packets are rejected.

I have the feeling to have said everything, but I can try to explain differently. Let's given 3 kinds of nodes:

  1. nodes without any hmac-related option given to babeld command-line
  2. nodes with hmac configured with 1 key, and some whatever flag (no_hmac_verify, hmac_verify, ignore_no_hmac) at a non-default value
  3. nodes with hmac configured with 1 key and the flag at a default value

We expects that:

  1. nodes 1 can communicate with nodes 2
  2. nodes 2 can communicate with nodes 3
  3. nodes 1 can not communicate with nodes 3

#35 verifies the above 3 cases. The hmac branch of jech/babeld (91a9259) fails for case 2.

Otherwise, what would be the purpose of the discussed flag if it's not to provide a way to do a smooth upgrade to using HMAC ?

On a side note, my code e314264 is probably wrong.

Oops, I didn't notice that #52 has more commits than the hmac branch of jech/babeld. We use the latter.

About e314264 I don't see any code initializing hmac_verify to the default value of true.

from babeld.

MisterDA avatar MisterDA commented on August 28, 2024

Your presentation with the three kinds of nodes is very clear, thanks.
I applied (b909a58) your commit with some minor changes into my branch (#52).

About e314264 I don't see any code initializing hmac_verify to the default value of true.

Thanks, fixed in 7b79301.

from babeld.

jech avatar jech commented on August 28, 2024

I'm sorry if I'm daft, Julien, but I still don't understand.

The intent of the old code is that no HMAC verification is made at all if NO_HMAC_VERIFY is set. In other words, HMACs are ignored on reception, unconditionally. This is a simple semantics, and one that's easy to explain.

It looks like the code is buggy; that's possible, in which case I'll be grateful for a bugfix.

Your patch, however, changes the logic: now unsigned packets are accepted, but incorrectly signed packets (e.g. packets signed with an obsolete key) are rejected. This is a complicated semantics, one that is not easy to explain, and one that I don't feel is useful.

Would you be willing to provide a fix for the bug without changing the intent of the code?

from babeld.

jech avatar jech commented on August 28, 2024

The flag is now called accept-bad-signatures, and causes the interface to accept both unsigned packets and packets with an incorrect key. Rejecting the latter provides no additional security, since an attacker can simply send unsigned packets.

Please let me know if there's still something missing.

from babeld.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.