NetBSD-Bugs archive

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

bin/49539: netpgpkeys segfaults on bad commandline

>Number:         49539
>Category:       bin
>Synopsis:       netpgpkeys segfaults on bad ocmmandline
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 06 13:40:00 +0000 2015
>Originator:     Michael van Elst
>Release:        NetBSD 7.99.2
                                Michael van Elst
                                "A potential Snark may lurk in every tree."
System: NetBSD twitty 7.99.2 NetBSD 7.99.2 (TWITTY) #22: Tue Dec 16 21:53:35 CET 2014 mlelstv@pussyfoot:/home/netbsd-current/obj.evbarm/home/netbsd-current/src/sys/arch/evbarm/compile/TWITTY evbarm
Architecture: earmv6hf
Machine: evbarm

netpgpkeys passes a NULL pointer to its command functions when
a parameter (usually a filename) is missing.

|         if (optind == argc) {
|                 if (!netpgp_cmd(&netpgp, &p, NULL)) {

The command function does not check the passed value and dereferences
the NULL pointer.


twitty% netpgpkeys --import-key
/home/mlelstv/.gnupg/pubring.gpg: No such file or directory
Can't read pubring /home/mlelstv/.gnupg/pubring.gpg
Can't read pub keyring
Segmentation fault


Check arguments either when parsing or when evaluating them.


Home | Main Index | Thread Index | Old Index