diff options
author | Lawrence Brakmo <brakmo@fb.com> | 2018-01-25 16:14:05 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-01-25 16:41:13 -0800 |
commit | 2585cd62f0986a6e6d9c83363ed6dbcc66bc9f32 (patch) | |
tree | c253c21199292459117b3e72e0a98701bab5c9fe /net/ipv4/tcp_output.c | |
parent | e9dcd80b9d77a92bfae6ce42a451f5c5fd318832 (diff) | |
download | linux-2585cd62f0986a6e6d9c83363ed6dbcc66bc9f32.tar.gz linux-2585cd62f0986a6e6d9c83363ed6dbcc66bc9f32.tar.bz2 linux-2585cd62f0986a6e6d9c83363ed6dbcc66bc9f32.zip |
bpf: Only reply field should be writeable
Currently, a sock_ops BPF program can write the op field and all the
reply fields (reply and replylong). This is a bug. The op field should
not have been writeable and there is currently no way to use replylong
field for indices >= 1. This patch enforces that only the reply field
(which equals replylong[0]) is writeable.
Fixes: 40304b2a1567 ("bpf: BPF support for sock_ops")
Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions