bianbu-linux-6.6/tools/include
Brennan Xavier McManus f678c3c336 tools/nolibc/stdlib: fix memory error in realloc()
commit 791f4641142e2aced85de082e5783b4fb0b977c2 upstream.

Pass user_p_len to memcpy() instead of heap->len to prevent realloc()
from copying an extra sizeof(heap) bytes from beyond the allocated
region.

Signed-off-by: Brennan Xavier McManus <bxmcmanus@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Fixes: 0e0ff63840 ("tools/nolibc/stdlib: Implement `malloc()`, `calloc()`, `realloc()` and `free()`")
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-12 11:11:19 +02:00
..
asm tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' 2023-05-17 10:42:19 -03:00
asm-generic tools: KVM: selftests: Convert clear/set_bit() to actual atomics 2022-12-02 13:22:35 -05:00
linux memblock tests: fix undefined reference to `panic' 2024-05-17 12:02:14 +02:00
nolibc tools/nolibc/stdlib: fix memory error in realloc() 2024-06-12 11:11:19 +02:00
tools tools include: add dis-asm-compat.h to handle version differences 2022-08-01 15:29:49 -03:00
trace/events tools/lib/lockdep: Remove private kernel headers 2017-06-05 09:28:14 +02:00
uapi bpf: Derive source IP addr via bpf_*_fib_lookup() 2024-03-01 13:35:04 +01:00
vdso tools headers: Synchronize {linux,vdso}/bits.h with the kernel sources 2023-03-03 22:34:15 -03:00