Messages in this thread | | | Date | Mon, 5 Jul 2021 14:56:03 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH] perf top: fix overflow in elf_sec__is_text |
| |
Em Tue, Jun 22, 2021 at 12:46:38PM -0700, Namhyung Kim escreveu: > Hi Riccardo, > > On Mon, Jun 21, 2021 at 3:22 PM Riccardo Mancini <rickyman7@gmail.com> wrote: > > > > ASan reports a heap-buffer-overflow in elf_sec__is_text when using perf-top. > > The bug is caused by the fact that secstrs is built from runtime_ss, while > > shdr is built from syms_ss if shdr.sh_type != SHT_NOBITS. Therefore, they > > point to two different ELF files. > > > > This patch renames secstrs to secstrs_run and adds secstrs_sym, so that > > the correct secstrs is chosen depending on shdr.sh_type.
Thanks, applied.
- Arnaldo
| |