]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
randstruct: Check member structs in is_pure_ops_struct()
authorJoonwon Kang <kjw1627@gmail.com>
Sat, 27 Jul 2019 15:58:41 +0000 (00:58 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:14:02 +0000 (13:14 +0200)
commit5f8095b682d6037becbda55f0a73dc96cffa7071
treea96123b138bbf9441b3c7b73d172fbdb75bd8fb9
parent03d53cb8acb86a6332af752cf7cb916821a4a713
randstruct: Check member structs in is_pure_ops_struct()

commit 60f2c82ed20bde57c362e66f796cf9e0e38a6dbb upstream.

While no uses in the kernel triggered this case, it was possible to have
a false negative where a struct contains other structs which contain only
function pointers because of unreachable code in is_pure_ops_struct().

Signed-off-by: Joonwon Kang <kjw1627@gmail.com>
Link: https://lore.kernel.org/r/20190727155841.GA13586@host
Fixes: 313dd1b62921 ("gcc-plugins: Add the randstruct plugin")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/gcc-plugins/randomize_layout_plugin.c