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

Nil dereference in irmaclient when downloading new public keys during session #370

Open
ivard opened this issue Dec 15, 2023 · 0 comments
Open

Comments

@ivard
Copy link
Member

ivard commented Dec 15, 2023

Analysis

  1. A nil dereference occurs here. The scheme variable is nil at that point.
  2. The above function is called here. At this point, the scheme is also nil.
  3. Two lines above, the scheme is defined as follows: scheme := conf.SchemeManagers[issuerid.SchemeManagerIdentifier()]. Therefore, the scheme to which the issuer belongs is not present in the configuration.

The stack trace starts with irmaclient.(*Client).newQrSession. This happens during a session.
The error report came from irmamobile version 6.2.3. It does not seem to be originating from a developer, so it is likely from a normal user.

From (3), it is likely that it was related to pbdf or irma-demo. Normally, these are always present in conf.SchemeManagers, but in (1) we see that this is not the case now. From (2), the app was well underway, so this cannot be because the app had not finished starting. After startup, there is, in my opinion, only one way that these schemes are not in conf.SchemeManagers. They are temporarily removed during the periodic scheme update function.

Therefore, suspicion: this problem occurred because the session happened exactly at the same time as the temporary scheme update function.

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

No branches or pull requests

1 participant