NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-powerpc/46711: Generating a gpg2 key causes a "user PGM trap" kernel loop

>Number:         46711
>Category:       port-powerpc
>Synopsis:       Generating a gpg2 key causes a "user PGM trap" kernel loop
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-powerpc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 17 03:10:00 +0000 2012
>Release:        NetBSD 6.99.8
System: NetBSD 6.99.8 NetBSD 6.99.8 (MINI) #36: Mon Jul 16 
19:29:36 EDT 2012
Architecture: powerpc
Machine: macppc
        I installed gpg2 on a Mac Mini G4 running NetBSD/macppc 6.99.8 (with
        sources from 2012/07/01) and attempted to generate a new key with
        "gpg2 --gen-key".  I selected the default of 2 RSA keys, then 4096
        bits, then filed the user name and email address and, at that point,
        the kernel started spewing hundreds of messages like:

        trap: pid 28900.1 (gpg-agent): user PGM trap @ 0xfde6c7e8 (SRR1=0x8f032)

        in a continuous loop.  The machine remained responsive: the console was
        barely usable probably due to the unstoppable amount of fast output,
        but I could SSH into the machine and reboot it, albeit slowly.

        The printed message is protected by a cpu_printfataltraps guard in the
        source code (see sys/arch/powerpc/powerpc/trap.c), so I am not sure if
        the only problem here is an overeager printf and gpg-agent triggering
        it just too many times for whatever reason, or actually the desired
        signal is not being delivered to the caller process correctly.

        Regardless, this seems to me like a local DOS because the machine
        becomes unusable and can be triggered by an unprivileged user.

        I have no reasons to believe this is specific to my particular machine
        nor macppc either.  Because of the location of the message, this might
        affect all powerpc ports, hence why I'm using the port-powerpc
        See the description above, but to summarize:
        1) Install a powerpc-based port, current.
        2) Install gpg2 from pkgsrc.
        3) Run gpg2 --gen-key.
        4) Follow the instructions.
        5) See the kernel printing lots of messages.


Home | Main Index | Thread Index | Old Index