lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQLiqRdE0iqSFM7za2g5UVNDE-ZZmS7+pca176_ePKsZvA@mail.gmail.com>
Date:   Wed, 29 Dec 2021 08:44:08 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     menglong8.dong@...il.com
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
        Menglong Dong <imagedong@...cent.com>
Subject: Re: [PATCH net-next] net: bpf: hook for inet port bind conflict check

On Wed, Dec 29, 2021 at 12:56 AM <menglong8.dong@...il.com> wrote:
>
> From: Menglong Dong <imagedong@...cent.com>
>
> This hook of cgroup is called while TCP/UDP local port bind conflict
> check. This is different from the 'commit aac3fc320d94 ("bpf: Post-hooks
> for sys_bind")', as it is also called in autobind case.
>
> For TCP, this hook is called during sys_bind() and autobind. And it
> is also called during tcp_v4_connect() before hash the sock to ehash,
> during which src ip, src port, dst ip, and dst port is already
> allocated, means that we have a chance to determine whether this
> connect should continue.
>
> This can be useful when we want some applications not to use some
> port (include auto bind port). For autobind, the kernel has the chance
> to choose another port.

The use case is too vague to consider adding a new hook.
Also there are no selftests.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ