-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential Issue with CurrHF and CurrINF Relationship After Decoding #4531
Comments
More generally, at the moment, the router seems to assume that the path is valid if |
As the info field and hop field information together is protected by the MAC, I think that this can't be exploited to circumvent path authorization. Still, I agree that it would seem prudent to check for this, to avoid forwarding (or replying to) packets with malformed path data. By the way; the path parser currently rejects truncated paths (length shorter than required for indicated number of hop fields), but allows longer paths (i.e paths with trailing garbage). I wonder if this should be forbidden for the same reason. |
For the time being, we haven't found any case where trailing garbage in the path is problematic for the router. However, we are currently addressing/verifying the last assumptions in the router, so we should be able to tell soon if that is actually the case. |
This PR strengthens the checks performed by the `parsePath` method to address the issues #4524 and #4531. In particular, I added two checks: - We check that the `CurrHF` field of the parsed path is compatible with the `CurrINF` field - We check that non-peering segments have at least two hops The proof that solution is correct is available in viperproject/VerifiedSCION#364
Fixed by #4556 |
Hi everyone,
CC: @jcp19
While proving the correctness of the router in the context of VerifiedSCION, I tried to confirm that the current Infofield (CurrINF) and the current Hopfield (CurrHF) point to the same segment after decoding. Within the codebase, there exists the following function:
However, this function is only used in
incPath
, which is called either when the packet leaves the AS or a segment switch is performed. This happens very late in the processing of a packet. This could lead to potential problems in the router. In particular, the checksvalidateHopExpiry()
andverifyCurrentMAC()
could be performed with the wrong Infofield.I am not sure if it is possible to satisfy
verifyCurrentMAC()
in this way, but if it is, the router would incorrectly perform an xover step, which is not supposed to happen.So far, I haven't found a concrete counterexample, but it seems that the missing check can have a significant impact. Do you think such a check is necessary, or was it intentionally left out?
Thank you for your help.
The text was updated successfully, but these errors were encountered: