-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Missing CASESession interlocks with NOC cluster #18431
Comments
Agreed with the proposal to store fabric table + fabric index. That is simple and will result in 'correct' behavior. Perhaps there is also a fancy c++ trick we can employ to prevent code from storing FabricInfo *. As to eviction / cancelation during session establishment, I think this can be relatively simple as we are now allocating session slots in the secure session table at the beginning of session establishment. This can just be one more case where the session manager can reclaim the session table entry, and the code in CASESession / PASESession can just be mindful that it, like all other consumers of session references, may lose its reference. This has implications for ongoing discussions between @kghost , @mrjerryjohns and myself. There had been an idea that during session establishment, sessions should not be evictable. This apparently will not be the case. We should just choose not to evict these to make room for new session establishment requests. But for fabric removal or NOC changes, it does seem very clear that the session manager will need to pull sessions out from under CASESession. |
I can't speak to the specific implementation details but idea of invalidating pending CASE session establishments when those scenarios arise is something I agree with. |
Adding spec label because of the following constraints of AddNOC and UpdateNOC:
and
|
This may not be true. We can add changes that evict that session by handling OnSessionReleased in PairingSession class.
I'm not clear how it helps. Both index and info are pointer like objects, there is not fundimental different between them. The ideal solution should prevent dangling index from happening, we should release the pairing session when the fabric is removed. |
|
Fabric index can wrap around, but ideally things that are referencing a fabric index will get notified on fabric removal and deal. Certainly deal before a new fabric can be commissioned. |
Problem
When
UpdateNOC
,RemoveFabric
orRemoveTrustedRootCertificate
are done, there is fundamental change to the credentials that may impact security properties.This is because of two reasons:
FabricInfo *
that, in initiator cases, may possibly be no longer valid, and in responder cases, may relate to a fabric no longer valid, but where a Sigma3 reception may ariseThis could lead to unforeseen privilege escalation, or privilege loss, or cross-fabric session establishment.
Proposed Solution
To address this problem, suggest:
FabricTable *
andFabricIndex
rather than aFabricInfo *
in session state, and always using look-up of fabric by index via aconst FabricInfo * GetFabricInfo() const
that is always used ephemerally and without keeping references toFabricInfo *
over the session establishment --> this would reduce corners/edges of where FabricInfo object is long held but context has changed.FabricTableHasChanged(FabricIndex index, const FabricInfo * newFabricInfo)
, wherenewFabricInfo *
is null on deletion, to assist the following:RemoveFabric
orRemoveTrustedRootCertificate
), that is, whenever FabricTableFabricTableDelegate::FabricTableHasChanged()
is called.SessionManager
.SessionManager
.FYI @bzbarsky-apple @msandstedt @emargolis @balducci-apple
The text was updated successfully, but these errors were encountered: