mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
4b2e40a925
If glibc is build with -O3 on at least 390 (-m31) or x86 (-m32), gcc 11 dumps this warning: svc_tcp.c: In function 'rendezvous_request': svc_tcp.c:274:3: error: 'memcpy' offset [0, 15] is out of the bounds [0, 0] [-Werror=array-bounds] 274 | memcpy (&xprt->xp_raddr, &addr, sizeof (addr)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors In out-of-memory case, if one of the mallocs in makefd_xprt function returns NULL, a message is dumped, makefd_xprt returns NULL and the subsequent memcpy would copy to NULL. Instead of a segfaulting, we delay a bit (see also __svc_accept_failed and Bug 14889 (CVE-2011-4609) - svc_run() produces high cpu usage when accept() fails with EMFILE (CVE-2011-4609). The same applies to svc_unix.c. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> |
||
---|---|---|
.. | ||
rpc | ||
auth_des.c | ||
auth_none.c | ||
auth_unix.c | ||
authdes_prot.c | ||
authuxprot.c | ||
clnt_gen.c | ||
clnt_perr.c | ||
clnt_raw.c | ||
clnt_simp.c | ||
clnt_tcp.c | ||
clnt_udp.c | ||
clnt_unix.c | ||
create_xid.c | ||
des_crypt.c | ||
des_impl.c | ||
des_soft.c | ||
get_myaddr.c | ||
getrpcport.c | ||
key_call.c | ||
key_prot.c | ||
Makefile | ||
netname.c | ||
openchild.c | ||
pm_getmaps.c | ||
pm_getport.c | ||
pmap_clnt.c | ||
pmap_prot2.c | ||
pmap_prot.c | ||
pmap_rmt.c | ||
publickey.c | ||
rpc_cmsg.c | ||
rpc_common.c | ||
rpc_dtable.c | ||
rpc_gethostbyname.c | ||
rpc_prot.c | ||
rpc_thread.c | ||
rtime.c | ||
svc_auth.c | ||
svc_authux.c | ||
svc_raw.c | ||
svc_run.c | ||
svc_simple.c | ||
svc_tcp.c | ||
svc_udp.c | ||
svc_unix.c | ||
svc.c | ||
svcauth_des.c | ||
test-rpcent.c | ||
thrsvc.c | ||
tst-getmyaddr.c | ||
tst-svc_register.c | ||
tst-udp-error.c | ||
tst-udp-garbage.c | ||
tst-udp-nonblocking.c | ||
tst-udp-timeout.c | ||
tst-xdrmem2.c | ||
tst-xdrmem.c | ||
Versions | ||
xcrypt.c | ||
xdr_array.c | ||
xdr_float.c | ||
xdr_intXX_t.c | ||
xdr_mem.c | ||
xdr_rec.c | ||
xdr_ref.c | ||
xdr_sizeof.c | ||
xdr_stdio.c | ||
xdr.c |