glibc/malloc
Wilco Dijkstra ac92c66821 Fix tcache count maximum (BZ #24531)
The tcache counts[] array is a char, which has a very small range and thus
may overflow.  When setting tcache_count tunable, there is no overflow check.
However the tunable must not be larger than the maximum value of the tcache
counts[] array, otherwise it can overflow when filling the tcache.

	[BZ #24531]
	* malloc/malloc.c (MAX_TCACHE_COUNT): New define.
	(do_set_tcache_count): Only update if count is small enough.
	* manual/tunables.texi (glibc.malloc.tcache_count): Document max value.

(cherry picked from commit 5ad533e8e6)
2019-05-22 15:41:24 +01:00
..
alloc_buffer_alloc_array.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_allocate.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_copy_bytes.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_copy_string.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_create_failure.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
arena.c malloc: Remove corrupt arena flag 2017-11-28 19:10:16 +05:30
Depend
dynarray_at_failure.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
dynarray_emplace_enlarge.c dynarray: Set errno on overflow-induced allocation failure 2017-09-06 16:13:53 +02:00
dynarray_finalize.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
dynarray_resize_clear.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
dynarray_resize.c dynarray: Set errno on overflow-induced allocation failure 2017-09-06 16:13:53 +02:00
dynarray-skeleton.c dynarray: Implement begin/end functions in the spirit of C++ 2017-06-13 21:55:10 +02:00
dynarray.h dynarray: Use libc_hidden_proto only for !_ISOMAC 2017-06-19 12:58:08 +02:00
hooks.c Silence -O3 -Wall warning in malloc/hooks.c with GCC 7 [BZ #22052] 2017-12-06 16:15:47 +01:00
Makefile Fix integer overflows in internal memalign and malloc [BZ #22343] [BZ #22774] 2018-02-08 15:47:05 +01:00
malloc-hooks.h
malloc-internal.h i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120] 2017-06-30 09:11:24 -07:00
malloc.c Fix tcache count maximum (BZ #24531) 2019-05-22 15:41:24 +01:00
malloc.h Add reallocarray function 2017-05-30 18:27:57 -03:00
mallocbug.c
mcheck-init.c
mcheck.c
mcheck.h
memusage.c
memusage.sh
memusagestat.c
morecore.c
mtrace.c Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
mtrace.pl
obstack.c
obstack.h
reallocarray.c Add reallocarray function 2017-05-30 18:27:57 -03:00
scratch_buffer_grow_preserve.c
scratch_buffer_grow.c
scratch_buffer_set_array_size.c
set-freeres.c
thread-freeres.c
tst-alloc_buffer.c Prevent an implicit int promotion in malloc/tst-alloc_buffer.c 2017-06-26 09:56:26 -03:00
tst-calloc.c
tst-dynarray-at-fail.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
tst-dynarray-fail.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
tst-dynarray-shared.h dynarray: Implement begin/end functions in the spirit of C++ 2017-06-13 21:55:10 +02:00
tst-dynarray.c dynarray: Set errno on overflow-induced allocation failure 2017-09-06 16:13:53 +02:00
tst-interpose-aux-nothread.c
tst-interpose-aux-thread.c
tst-interpose-aux.c
tst-interpose-aux.h
tst-interpose-nothread.c
tst-interpose-skeleton.c
tst-interpose-static-nothread.c
tst-interpose-static-thread.c
tst-interpose-thread.c
tst-malloc-backtrace.c
tst-malloc-fork-deadlock.c
tst-malloc-tcache-leak.c malloc: Fix tcache leak after thread destruction [BZ #22111] 2017-10-06 10:35:30 -07:00
tst-malloc-thread-exit.c
tst-malloc-thread-fail.c
tst-malloc-too-large.c Fix integer overflows in internal memalign and malloc [BZ #22343] [BZ #22774] 2018-02-08 15:47:05 +01:00
tst-malloc-usable-static-tunables.c
tst-malloc-usable-static.c
tst-malloc-usable-tunables.c
tst-malloc-usable.c
tst-malloc.c
tst-mallocfork2.c
tst-mallocfork.c
tst-mallocstate.c
tst-mallopt.c
tst-mcheck.c
tst-memalign.c
tst-mtrace.c
tst-mtrace.sh
tst-obstack.c
tst-posix_memalign.c
tst-pvalloc.c
tst-realloc.c tst-realloc: do not check for errno on success [BZ #22611] 2017-12-31 21:21:27 +01:00
tst-reallocarray.c Add reallocarray function 2017-05-30 18:27:57 -03:00
tst-scratch_buffer.c
tst-trim1.c
tst-valloc.c
Versions Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00