Re: [PATCH bpf v1] bpf: Fix OOB in bpf_obj_memcpy for cgroup storage
From: Ihor Solodrai
Date: Mon Mar 16 2026 - 17:29:57 EST
On 3/16/26 1:50 PM, Martin KaFai Lau wrote:
>
>
> On 3/16/26 6:51 AM, xulang wrote:
>> From: Lang Xu <xulang@xxxxxxxxxxxxx>
>>
>>> Please create a selftest for this.
>>
>> Going to do that. To stably reproduce this bug, I need the KASAN
>> config enabled, how do I ensure it's enabled during a selftest cycle,
>> by adding the line below to the 'config'? not quite sure.
>>
>> --- a/tools/testing/selftests/bpf/config
>> +++ b/tools/testing/selftests/bpf/config
>> @@ -46,6 +46,7 @@ CONFIG_IPV6_GRE=y
>> CONFIG_IPV6_SEG6_BPF=y
>> CONFIG_IPV6_SIT=y
>> CONFIG_IPV6_TUNNEL=y
>> +CONFIG_KASAN=y
>
> I would leave out this config change from this fix for now. cc: Ihor to consider enabling it for bpf-next.
>
> It is still useful to have a selftest for this case. I always have KASAN turned on when running selftests.
Hi Martin. BPF CI has been running with KASAN since July 2025.
We only disabled it on s390x due to frequent OOMs, x86_64 and
aarch64 are covered.
For BPF CI it's not important whether CONFIG_KASAN=y is enabled
in tools/testing/selftests/bpf/config, as long as it's not =n
>
>
>>> [...]