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

[BUG] SetCredentialResponse Command -nextCredentialIndex value deviates from Spec when RESOURCE_EXHAUTION #33805

Closed
sumaky opened this issue Jun 7, 2024 · 1 comment
Labels
bug Something isn't working cert blocker needs triage

Comments

@sumaky
Copy link

sumaky commented Jun 7, 2024

Reproduction steps

Steps to be followed

  1. ./chip-tool doorlock read number-of-credentials-supported-per-user 1 1
    value returned is 5
  2. ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000
  3. ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000
  4. ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 2 }' 223456 1 null null 1 1 --timedInteractionTimeoutMs 1000
  5. ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 3 }' 323456 1 null null 1 1 --timedInteractionTimeoutMs 1000
  6. ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 4 }' 423456 1 null null 1 1 --timedInteractionTimeoutMs 1000
  7. ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 5 }' 523456 1 null null 1 1 --timedInteractionTimeoutMs 1000
  8. ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 6 }' 623456 1 null null 1 1 --timedInteractionTimeoutMs 1000
    (Going beyond number-of-credentials-supported-per-user which is 5). The response has the RESOURCE_EXHAUSTION (137) status but nextCredentialIndex is 7 which deviates from spec.( SHALL requirement)

The response obtained is as follows
[1717761916.719275][14255:14258] CHIP:DMG: },
[1717761916.719296][14255:14258] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023
[1717761916.719305][14255:14258] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023
[1717761916.719323][14255:14258] CHIP:TOO: SetCredentialResponse: {
[1717761916.719326][14255:14258] CHIP:TOO: status: 137
[1717761916.719330][14255:14258] CHIP:TOO: userIndex: null
[1717761916.719333][14255:14258] CHIP:TOO: nextCredentialIndex: 7

[1717761916.719337][14255:14258] CHIP:TOO: }
[1717761916.719349][14255:14258] CHIP:DMG: ICR mo

Spec Reference
SetCredential 2024-06-07 17-39-08

Bug prevalence

always

GitHub hash of the SDK that was being used

NA

Platform

other

Platform Version(s)

No response

Anything else?

No response

@sumaky sumaky added bug Something isn't working needs triage labels Jun 7, 2024
@sumaky
Copy link
Author

sumaky commented Jun 13, 2024

not an issue

@sumaky sumaky closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cert blocker needs triage
Projects
Archived in project
Development

No branches or pull requests

2 participants