Re: [PATCH v2] net: bpf: fix request_sock leak in filter.c

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

 



Hello:

This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@xxxxxxxxxxxxx>:

On Wed, 15 Jun 2022 11:15:40 +1000 you wrote:
> v2 of this patch contains, refactor as per Daniel Borkmann's suggestions to
> validate RCU flags on the listen socket so that it balances with
> bpf_sk_release() and update comments as per Martin KaFai Lau's suggestion.
> One small change to Daniels suggestion, put "sk = sk2" under "if (sk2 != sk)"
> to avoid an extra instruction.
> 
> A customer reported a request_socket leak in a Calico cloud environment. We
> found that a BPF program was doing a socket lookup with takes a refcnt on
> the socket and that it was finding the request_socket but returning the parent
> LISTEN socket via sk_to_full_sk() without decrementing the child request socket
> 1st, resulting in request_sock slab object leak. This patch retains the
> existing behaviour of returning full socks to the caller but it also decrements
> the child request_socket if one is present before doing so to prevent the leak.
> 
> [...]

Here is the summary with links:
  - [v2] net: bpf: fix request_sock leak in filter.c
    https://git.kernel.org/bpf/bpf/c/3046a827316c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





[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