seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()
BugLink: http://bugs.launchpad.net/bugs/1721550 commit 66a733ea upstream. 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:Chris Salls <chrissalls5@gmail.com> Signed-off-by:
Oleg Nesterov <oleg@redhat.com> [tycho: add __get_seccomp_filter vs. open coding refcount_inc()] Signed-off-by:
Tycho Andersen <tycho@docker.com> [kees: tweak commit log] Signed-off-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Stefan Bader <stefan.bader@canonical.com> Signed-off-by:
Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Showing
Please register or sign in to comment