privacybydesign/irmago

Nil dereference in irmaclient when downloading new public keys during session

Opened this issue · 0 comments

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.