A use-after-free flaw was found in btf_dump_name_dups in tools/lib/bpf/btf_dump.c in libbpf in the Linux kernel. This issue occurs because the key stored in the hash table name_map is a string address, and the string memory is allocated by realloc() function. When the memory is resized by realloc() later, the old memory may be freed.
A use-after-free flaw was found in btf_dump_name_dups in tools/lib/bpf/btf_dump.c in libbpf in the Linux kernel. This issue occurs because the key stored in the hash table name_map is a string address, and the string memory is allocated by realloc() function. When the memory is resized by realloc() later, the old memory may be freed.