mirror of git://sourceware.org/git/glibc.git
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>
|
||
|---|---|---|
| .. | ||
| arpa | ||
| bits | ||
| gnu | ||
| net | ||
| netinet | ||
| programs | ||
| protocols | ||
| rpc | ||
| rpcsvc | ||
| sys | ||
| aio.h | ||
| aliases.h | ||
| alloc_buffer.h | ||
| alloca.h | ||
| allocate_once.h | ||
| ar.h | ||
| argp-fmtstream.h | ||
| argp.h | ||
| argz.h | ||
| array_length.h | ||
| assert.h | ||
| atomic.h | ||
| byteswap.h | ||
| complex.h | ||
| cpio.h | ||
| crypt.h | ||
| ctype.h | ||
| des.h | ||
| dirent.h | ||
| dlfcn.h | ||
| dso_handle.h | ||
| elf.h | ||
| endian.h | ||
| envz.h | ||
| err.h | ||
| errno.h | ||
| error.h | ||
| execinfo.h | ||
| fcntl.h | ||
| features.h | ||
| fenv.h | ||
| file_change_detection.h | ||
| float.h | ||
| fmtmsg.h | ||
| fnmatch.h | ||
| fpu_control.h | ||
| fstab.h | ||
| fts.h | ||
| ftw.h | ||
| gconv.h | ||
| getopt.h | ||
| getopt_int.h | ||
| glob.h | ||
| gmp.h | ||
| gnu-versions.h | ||
| grp-merge.h | ||
| grp.h | ||
| gshadow.h | ||
| iconv.h | ||
| ifaddrs.h | ||
| ifreq.h | ||
| ifunc-impl-list.h | ||
| inline-hashtab.h | ||
| intprops.h | ||
| inttypes.h | ||
| langinfo.h | ||
| lastlog.h | ||
| libc-diag.h | ||
| libc-internal.h | ||
| libc-pointer-arith.h | ||
| libc-symbols.h | ||
| libgen.h | ||
| libintl.h | ||
| limits.h | ||
| link.h | ||
| list.h | ||
| list_t.h | ||
| locale.h | ||
| loop_unroll.h | ||
| malloc.h | ||
| math-narrow-eval.h | ||
| math.h | ||
| mcheck.h | ||
| memory.h | ||
| mntent.h | ||
| monetary.h | ||
| mqueue.h | ||
| netdb.h | ||
| netgroup.h | ||
| nl_types.h | ||
| nss.h | ||
| nss_files.h | ||
| nsswitch.h | ||
| obstack.h | ||
| plural-exp.h | ||
| poll.h | ||
| printf.h | ||
| pthread.h | ||
| pty.h | ||
| pwd.h | ||
| random-bits.h | ||
| re_comp.h | ||
| regex.h | ||
| regexp.h | ||
| resolv.h | ||
| rounding-mode.h | ||
| rtld-malloc.h | ||
| sched.h | ||
| scratch_buffer.h | ||
| search.h | ||
| set-hooks.h | ||
| setjmp.h | ||
| sgtty.h | ||
| shadow.h | ||
| shlib-compat.h | ||
| signal.h | ||
| spawn.h | ||
| stab.h | ||
| stackinfo.h | ||
| stap-probe.h | ||
| stdc-predef.h | ||
| stdint.h | ||
| stdio.h | ||
| stdio_ext.h | ||
| stdlib.h | ||
| string.h | ||
| strings.h | ||
| struct___timeb64.h | ||
| struct___timespec64.h | ||
| struct___timeval64.h | ||
| stubs-prologue.h | ||
| syscall.h | ||
| sysexits.h | ||
| syslog.h | ||
| tar.h | ||
| termios.h | ||
| tgmath.h | ||
| time.h | ||
| ttyent.h | ||
| uchar.h | ||
| ucontext.h | ||
| ulimit.h | ||
| unistd.h | ||
| utime.h | ||
| utmp.h | ||
| values.h | ||
| verify.h | ||
| wait.h | ||
| wchar.h | ||
| wctype.h | ||
| wordexp.h | ||