]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Sockmap/tls, msg_push_data may leave end mark in place
authorJohn Fastabend <john.fastabend@gmail.com>
Sat, 11 Jan 2020 06:12:03 +0000 (06:12 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 15 Jan 2020 22:26:13 +0000 (23:26 +0100)
commit7e4e7dbf40e774ccce0cf87bb1c226154491f87a
treeb2010fdecca8c5ea9f0078a7725ca5ac0e285f45
parentd2152d924fc0d4e035f06c396a00928d7fbd2d8e
bpf: Sockmap/tls, msg_push_data may leave end mark in place

Leaving an incorrect end mark in place when passing to crypto
layer will cause crypto layer to stop processing data before
all data is encrypted. To fix clear the end mark on push
data instead of expecting users of the helper to clear the
mark value after the fact.

This happens when we push data into the middle of a skmsg and
have room for it so we don't do a set of copies that already
clear the end flag.

Fixes: 97b5d405d0613 ("bpf: sk_msg program helper bpf_msg_push_data")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/bpf/20200111061206.8028-6-john.fastabend@gmail.com
net/core/filter.c