Skip to content
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

Key for group fabric list storage changed, will make devices fail at group communication when OTA updates across the change #24161

Closed
bzbarsky-apple opened this issue Dec 21, 2022 · 1 comment · Fixed by #24163

Comments

@bzbarsky-apple
Copy link
Contributor

In #23409 the key under which group "fabric list" information is stored changed from "g/gfl" to "g/fl".

I believe this breaks GroupSessionIteratorImpl::GroupSessionIteratorImpl reading its data from storage, so after OTA I'm pretty certain the device will no longer be able to receive group messages.

@bzbarsky-apple
Copy link
Contributor Author

Steps to reproduce:

  1. git checkout d2ae082^
  2. scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone is_asan=true
  3. ./out/debug/standalone/chip-all-clusters-app
  4. chip-tool pairing code 17 MT:-24J042C00KA0648G00
  5. chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 17 0
  6. chip-tool groupkeymanagement write group-key-map '[{"groupId": 16705, "groupKeySetID": 42}]' 17 0
  7. chip-tool groups add-group 0x4141 Light 17 1
  8. chip-tool groupsettings add-keysets 0xAAAA 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf
  9. chip-tool groupsettings bind-keyset 0x4141 0xAAAA
  10. Verify that chip-tool onoff toggle 0xffffffffffff4141 1 works (message is received and dispatched to endpoint 1)
  11. Kill all-clusters-app
  12. ./out/debug/standalone/chip-all-clusters-app
  13. Verify that chip-tool onoff toggle 0xffffffffffff4141 1 works (message is received and dispatched to endpoint 1)
  14. Kill all-clusters-app
  15. git checkout d2ae082
    1.scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone is_asan=true
  16. ./out/debug/standalone/chip-all-clusters-app
  17. Try to do chip-tool onoff toggle 0xffffffffffff4141 1 and watch it fail: Failed to retrieve Key. Discarding everything

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Dec 21, 2022
project-chip#23409 changed the key under
which we store group fabric info, which breaks reception of group messages if a
node updates from before that change to after that change.

We should just keep using the same key name, especially because sharing a single
storage key for all possible fabric lists (groups and whatever else will want to
store lists of fabric indices) does not necessarily make sense.

Fixes project-chip#24161
bzbarsky-apple added a commit that referenced this issue Dec 21, 2022
)

#23409 changed the key under
which we store group fabric info, which breaks reception of group messages if a
node updates from before that change to after that change.

We should just keep using the same key name, especially because sharing a single
storage key for all possible fabric lists (groups and whatever else will want to
store lists of fabric indices) does not necessarily make sense.

Fixes #24161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant