RE: [PATCH bpf-next 4/8] bpf, sockmap: Don't let child socket inherit psock or its ops on copy

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

 



Jakub Sitnicki wrote:
> Sockets cloned from the listening sockets that belongs to a SOCKMAP must
> not inherit the psock state. Otherwise child sockets unintentionally share
> the SOCKMAP entry with the listening socket, which would lead to
> use-after-free bugs.
> 
> Restore the child socket psock state and its callbacks at the earliest
> possible moment, that is right after the child socket gets created. This
> ensures that neither children that get accept()'ed, nor those that are left
> in accept queue and will get orphaned, don't inadvertently inherit parent's
> psock.
> 
> Signed-off-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx>
> ---

Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>



[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