glibc/sunrpc
Brad Hubbard ed6b0fe710 Use calloc to allocate xports (BZ #17542)
If xports is NULL in xprt_register we malloc it but if sock >
_rpc_dtablesize() that memory does not get initialised and may in theory
contain any value. Later we make a conditional jump in svc_getreq_common
based on the uninitialised memory and this caused a general protection
fault in rpc.statd on an older version of glibc but this code has not
changed since that version.

Following is the valgrind warning.

==26802== Conditional jump or move depends on uninitialised value(s)
==26802==    at 0x5343A25: svc_getreq_common (in /lib64/libc-2.5.so)
==26802==    by 0x534357B: svc_getreqset (in /lib64/libc-2.5.so)
==26802==    by 0x10DE1F: ??? (in /sbin/rpc.statd)
==26802==    by 0x10D0EF: main (in /sbin/rpc.statd)
==26802==  Uninitialised value was created by a heap allocation
==26802==    at 0x4C2210C: malloc (vg_replace_malloc.c:195)
==26802==    by 0x53438BE: xprt_register (in /lib64/libc-2.5.so)
==26802==    by 0x53450DF: svcudp_bufcreate (in /lib64/libc-2.5.so)
==26802==    by 0x10FE32: ??? (in /sbin/rpc.statd)
==26802==    by 0x10D13E: main (in /sbin/rpc.statd)
2015-03-18 14:51:26 +05:30
..
rpc Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rpcsvc Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
auth_des.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
auth_none.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
auth_unix.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
authdes_prot.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
authuxprot.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
bindrsvprt.c bindresvport() uses two static variables port and startport which are not 2012-11-19 02:05:12 -05:00
clnt_gen.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
clnt_perr.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
clnt_raw.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
clnt_simp.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
clnt_tcp.c Fix typos. 2013-08-29 09:11:45 +02:00
clnt_udp.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
clnt_unix.c Fix typos. 2013-08-29 09:11:45 +02:00
create_xid.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
des_crypt.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
des_impl.c
des_soft.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
etc.rpc * sunrpc/etc.rpc (fedfs_admin): Add entry. 2012-12-05 19:45:23 -07:00
get_myaddr.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
getrpcbyname_r.c Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. 2015-02-06 10:43:19 -08:00
getrpcbyname.c Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. 2015-02-06 10:43:19 -08:00
getrpcbynumber_r.c Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. 2015-02-06 10:43:19 -08:00
getrpcbynumber.c Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. 2015-02-06 10:43:19 -08:00
getrpcent_r.c Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. 2015-02-06 10:43:19 -08:00
getrpcent.c Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. 2015-02-06 10:43:19 -08:00
getrpcport.c
key_call.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
key_prot.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
Makefile Split rpcent tests out of tst-netdb. 2015-03-04 15:55:38 -08:00
netname.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
openchild.c Remove use of INTDEF/INTUSE in libio 2012-05-24 23:06:20 +02:00
pm_getmaps.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
pm_getport.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
pmap_clnt.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
pmap_prot2.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
pmap_prot.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
pmap_rmt.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
proto.h Support --with-pkgversion and --with-bugurl. 2012-11-09 22:13:45 +00:00
publickey.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rpc_clntout.c sunrpc: fix rpc bootstrap builds 2012-07-06 00:37:42 -04:00
rpc_cmsg.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
rpc_common.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
rpc_cout.c Remove __GNU_LIBRARY__ conditionals from rpcgen. 2012-03-09 22:46:12 +00:00
rpc_dtable.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
rpc_hout.c Fix some -Wformat warnings in rpcgen. 2012-07-26 14:35:05 -07:00
rpc_main.c Document rpcgen -5. Fixes bug 15825 2013-10-21 10:02:31 +02:00
rpc_parse.c
rpc_parse.h
rpc_prot.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
rpc_sample.c
rpc_scan.c
rpc_scan.h
rpc_svcout.c Fix some -Wformat warnings in rpcgen. 2012-07-26 14:35:05 -07:00
rpc_tblout.c
rpc_thread.c Fix typos. 2013-08-30 18:08:59 +02:00
rpc_util.c
rpc_util.h
rpcgen.c Use standard build rule to build rpcgen. 2012-03-10 00:56:21 +00:00
rpcinfo.c Support --with-pkgversion and --with-bugurl. 2012-11-09 22:13:45 +00:00
rtime.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
svc_auth.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
svc_authux.c
svc_raw.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
svc_run.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
svc_simple.c Fix sunrpc static library 2012-05-21 21:34:54 +02:00
svc_tcp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
svc_udp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
svc_unix.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
svc.c Use calloc to allocate xports (BZ #17542) 2015-03-18 14:51:26 +05:30
svcauth_des.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
test-rpcent.c Split rpcent tests out of tst-netdb. 2015-03-04 15:55:38 -08:00
thrsvc.c
tst-getmyaddr.c
tst-xdrmem2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-xdrmem.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Versions Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. 2015-02-06 10:43:19 -08:00
xcrypt.c Fix sunrpc static library 2012-05-21 21:34:54 +02:00
xdr_array.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
xdr_float.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
xdr_intXX_t.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
xdr_mem.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
xdr_rec.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
xdr_ref.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
xdr_sizeof.c Make sunrpc code usable again 2012-05-10 20:19:53 +02:00
xdr_stdio.c Remove use of INTDEF/INTUSE in libio 2012-05-24 23:06:20 +02:00
xdr.c Add comment about SIZE initialization in xdr.c 2014-07-10 10:33:48 +05:30