pivy icon indicating copy to clipboard operation
pivy copied to clipboard

Nitrokey 3: pivtool change-puk: Segmentation fault

Open matthiasbock opened this issue 1 year ago • 3 comments

Hi,

as described in issue #45, I am trying to set-up a Nitrokey 3. This issue looks different than the aforementioned one:

Changing the PIN seems to work...

$ ./pivy-tool change-pin
Enter current PIV PIN (2B671D88): 
Enter new PIV PIN (2B671D88): 
Confirm new PIV PIN (2B671D88): 

...but changing the PUK results in a segmentation fault:

$ ./pivy-tool change-puk
Enter current PUK (2B671D88): 
Enter new PUK (2B671D88): 
pivy-tool: PIN must be 4-8 characters
Enter current PUK (2B671D88): 
Enter new PUK (2B671D88): 
Confirm new PUK (2B671D88): 
Segmentation fault

I tried different numbers of characters, alphanumeric charset, only digits, but the problem persists. Any suggestions?

Cheers, Matthias

matthiasbock avatar Jan 11 '24 18:01 matthiasbock

What OS are you running this on? Do you get a core file from the segmentation fault?

jclulow avatar Jan 11 '24 18:01 jclulow

I use Debian Linux (bookworm), Linux kernel 5.10.0-19, amd64.

The error message above is the only output I get. How can I create a core file?

matthiasbock avatar Jan 11 '24 18:01 matthiasbock

You may not actually need to, you could try running it under the debugger? Maybe something like:

$ gdb ./pivy-tool
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
...

(gdb) run change-puk
... [presumably it will crash here]

(gdb) backtrace

jclulow avatar Jan 11 '24 19:01 jclulow