]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit3b7db175a8a84e41cfb68bf9ae9b7b820a5acb85
treefc31f7204ec420895d98a79a6687295ff14d15aa
parent490b7ba8db4a27258d07d4e742667a4bf5e404eb
bpf: Sockmap/tls, msg_push_data may leave end mark in place

BugLink: https://bugs.launchpad.net/bugs/1862429
commit cf21e9ba1eb86c9333ca5b05b2f1cc94021bcaef upstream.

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: 6fff607e2f14b ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/core/filter.c