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: <20190614163219.GE9636@mini-arch>
Date:   Fri, 14 Jun 2019 09:32:19 -0700
From:   Stanislav Fomichev <sdf@...ichev.me>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Stanislav Fomichev <sdf@...gle.com>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin Lau <kafai@...com>, Andrii Nakryiko <andriin@...com>
Subject: Re: [PATCH bpf-next v5 1/8] bpf: implement getsockopt and setsockopt
 hooks

On 06/13, Stanislav Fomichev wrote:
> > > My canonical example when reasoning about multiple progs was that each one
> > > of them would implement handling for a particular level+optname. So only
> > > a single one form the chain would return 2 or 0, the rest would return 1
> > > without touching the buffer. I can't come up with a good use-case where
> > > two programs in the chain can both return 2 and fill out the buffer.
> > > The majority of the sockopts would still be handled by the kernel,
> > > we'd have only a handful of bpf progs that handle a tiny subset
> > > and delegate the rest to the kernel.
> > >
> > > How about we stop further processing as soon as some program in the chain
> > > returned 2? I think that would address most of the concerns?
> > 
> > What about a case of passive "auditing" BPF programs, that are not
> > modifying anything, but want to capture every single
> > getsockopt/setsockopt call? This premature stop would render that
> > whole approach broken.
> In that case you'd attach that program to the root of a cgroup
> (sub)tree what you want to audit (and it would be always executed and
> would return 1)? And you'd have to attach it first.
On a second thought, that's not true. BPF progs are executed from the
bottom up, so attaching to the root cgroup wouldn't work for that auditing
case :-/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ