Re: [PATCH dwarves v2] btf_encoder: fix memory access bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/01/2025 00:03, ihor.solodrai@xxxxxxxxx wrote:
> December 16, 2024 at 10:31 AM, "Ihor Solodrai" <ihor.solodrai@xxxxx> wrote:
> 
>>
>> When compiled with address sanitizer, a couple of errors were reported
>>
>> on pahole BTF encoding:
>>
>>  * A memory leak of strdup(func->alias), due to unchecked
>>
>>  reassignment.
>>
>>  * A read of uninitialized memory in gobuffer__sort or bsearch in
>>
>>  case btf_funcs gobuffer is empty.
>>
>> Used compiler flags:
>>
>>  -fsanitize=undefined,address
>>
>>  -fsanitize-recover=address
>>
>>  -fno-omit-frame-pointer
>>
>> v1: https://lore.kernel.org/dwarves/20241213233205.633927-1-ihor.solodrai@xxxxx/
>>
>> Reviewed-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
>>
>> Signed-off-by: Ihor Solodrai <ihor.solodrai@xxxxx>
>>
>> ---
>>
>>  btf_encoder.c | 11 +++++++++--
>>
>>  1 file changed, 9 insertions(+), 2 deletions(-)
>>
> 
> Alan, Arnaldo,
> 
> This patch hasn't been applied.
> Just a reminder in case it fell off the radar.
>

Thanks for the reminder; we'll make sure this one gets applied shortly.
I wonder if we should add the -fsanitize flags to CFLAGS for RELEASE mode?





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux