Re: [PATCH bpf-next] bpf: initialize storage pointers to NULL to prevent freeing garbage pointer

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

 



On Mon, Mar 9, 2020 at 3:28 PM Andrii Nakryiko <andriin@xxxxxx> wrote:
>
> Local storage array isn't initialized, so if cgroup storage allocation fails
> for BPF_CGROUP_STORAGE_SHARED, error handling code will attempt to free
> uninitialized pointer for BPF_CGROUP_STORAGE_PERCPI storage type. Avoid this
> by always initializing storage pointers to NULLs.
>
> Fixes: 8bad74f9840f ("bpf: extend cgroup bpf core to allow multiple cgroup storage types")
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>

Applied to bpf tree and fixed typo in commit log.



[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