[Bug 231] New: ssh-keygen has fatal error while updating comment in RSA1 key

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu May 2 06:05:37 EST 2002


           Summary: ssh-keygen has fatal error while updating comment in
                    RSA1 key
           Product: Portable OpenSSH
           Version: 3.1p1
          Platform: HPPA
        OS/Version: HP-UX
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ssh-keygen
        AssignedTo: openssh-unix-dev at mindrot.org
        ReportedBy: rusr at cup.hp.com

ssh-keygen reports a fatal error while trying to update the comment field of
an RSA1 key. The error reported is 
"Couldn't obtain random bytes (error 604389476)"

This happens because somewhere between 3.0.2p1 and 3.1p1 (the two versions I 
examined), the calls to the init_rng() and seed_rng() in the main function got 
moved from near the beginning of the function to after where all the options 
are processed. The function do_change_comment() handles the comment changing 
and is called during option processing. do_change_comment() calls a function 
save the key file, which uses the random number generator, which has not been 
initialized or seeded and therefore the random number generator reports an 

The simplest fix, in my opinion, is to move the calls to init_rng() and seed_rng
() back to the beginning of the main function so the random number generator is 
always ready to be used. Since this program is not often called, the 
performance impact is negligible.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the openssh-unix-dev mailing list