Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1547108
| From | Daniel Borkmann <daniel@iogearbox.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 4.10 3/6] bpf: Use SHA256 instead of SHA1 for bpf digests |
| Date | 2016-12-24 21:10 +0100 |
| Message-ID | <sS0NH-34j-3@gated-at.bofh.it> (permalink) |
| References | <sRKfT-7Ww-3@gated-at.bofh.it> <sRKfU-7Ww-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 12/24/2016 03:22 AM, Andy Lutomirski wrote: > BPF digests are intended to be used to avoid reloading programs that > are already loaded. For use cases (CRIU?) where untrusted programs > are involved, intentional hash collisions could cause the wrong BPF > program to execute. Additionally, if BPF digests are ever used > in-kernel to skip verification, a hash collision could give privilege > escalation directly. Just for the record, digests will never ever be used to skip the verification step, so I don't know why this idea even comes up here (?) or is part of the changelog? As this will never be done anyway, rather drop that part so we can avoid confusion on this? Wrt untrusted programs, I don't see much of a use on this facility in general for them. Something like a tail call map would quite likely only be private to the application. And again, I really doubt we'll have something like user namespace support in the foreseeable future. Anyway, that said, I don't really have a big issue if you want to switch to sha256, though. > SHA1 is no longer considered adequately collision-resistant (see, for > example, all the major browsers dropping support for SHA1 > certificates). Use SHA256 instead. > > I moved the digest field to keep all of the bpf program metadata in > the same cache line. > > Cc: Daniel Borkmann <daniel@iogearbox.net> > Cc: Alexei Starovoitov <ast@kernel.org> > Signed-off-by: Andy Lutomirski <luto@kernel.org>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 4.10 3/6] bpf: Use SHA256 instead of SHA1 for bpf digests Andy Lutomirski <luto@kernel.org> - 2016-12-24 03:30 +0100
Re: [RFC PATCH 4.10 3/6] bpf: Use SHA256 instead of SHA1 for bpf digests Daniel Borkmann <daniel@iogearbox.net> - 2016-12-24 21:10 +0100
Re: [RFC PATCH 4.10 3/6] bpf: Use SHA256 instead of SHA1 for bpf digests Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-12-27 02:40 +0100
Re: [RFC PATCH 4.10 3/6] bpf: Use SHA256 instead of SHA1 for bpf digests Andy Lutomirski <luto@amacapital.net> - 2016-12-27 03:10 +0100
csiph-web