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
>Organization:
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."
>Environment:
	
	
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
>Description:

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.

>How-To-Repeat:

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

>Fix:

Check arguments either when parsing or when evaluating them.

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index