8098 Some xdr_simple(3nsl) and xdr_complex(3nsl) functions can succeed for undefined xdrs->x_op values

Review Request #442 - Created April 24, 2017 and submitted

Information
Marcel Telka
illumos-gate
master
8098
eaab405...
Reviewers
general
This modifies the following XDR functions from libnsl(3nsl) to fail in a case
an invalid value of xdrs->x_op is passed to them:

xdr_hyper(3nsl)
xdr_opaque(3nsl)
xdr_reference(3nsl)
xdr_vector(3nsl)
I ran the test attached to the bug report:

$ ./test 
xdr_hyper: OK
xdr_opaque: OK
xdr_reference: OK
xdr_vector: OK
xdr_vector: OK
$ LD_PRELOAD=$CODEMGR_WS/proto/root_i386/usr/lib/libnsl.so.1 ./test 
xdr_hyper: FAIL
xdr_opaque: FAIL
xdr_reference: FAIL
xdr_vector: FAIL
xdr_vector: FAIL
$
Yuri Pankov
Yuri Pankov
Jason King
Vitaliy Gusev
Marcel Telka
Review request changed

Status: Closed (submitted)

Change Summary:

commit 22cc57556161a28b2141976ff578db2558def3e1
Author:     Marcel Telka <marcel@telka.sk>
AuthorDate: Sun Apr 23 22:04:04 2017 +0200
Commit:     Robert Mustacchi <rm@joyent.com>
CommitDate: Wed May 3 21:21:34 2017 +0000

    8098 Some xdr_simple(3nsl) and xdr_complex(3nsl) functions can succeed for undefined xdrs->x_op values
    Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
    Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
    Reviewed by: Vitaliy Gusev <gusev.vitaliy@icloud.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

:100644 100644 6d5095f... dd13140... M	usr/src/lib/libnsl/rpc/xdr.c
:100644 100644 c3b4508... 80e49cf... M	usr/src/lib/libnsl/rpc/xdr_array.c
:100644 100644 e3be8f2... c20ee18... M	usr/src/lib/libnsl/rpc/xdr_refer.c
Loading...