Skip to content
Commit 66a733ea authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Kees Cook
Browse files

seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()

As Chris explains, get_seccomp_filter() and put_seccomp_filter() can end
up using different filters. Once we drop ->siglock it is possible for
task->seccomp.filter to have been replaced by SECCOMP_FILTER_FLAG_TSYNC.

Fixes: f8e529ed

 ("seccomp, ptrace: add support for dumping seccomp filters")
Reported-by: default avatarChris Salls <chrissalls5@gmail.com>
Cc: stable@vger.kernel.org # needs s/refcount_/atomic_/ for v4.12 and earlier
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
[tycho: add __get_seccomp_filter vs. open coding refcount_inc()]
Signed-off-by: default avatarTycho Andersen <tycho@docker.com>
[kees: tweak commit log]
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent e19b205b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment