]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfnetlink: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Wed, 30 May 2018 19:17:56 +0000 (12:17 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Jun 2018 07:47:42 +0000 (09:47 +0200)
commit9d71f414d685e5589e00c1a6057f7682637ee0eb
tree9bf5e9c52b653f9907ce72e729acda9dc255c639
parent6bcf222fcdf52d27f1afab6bca73035f77e63e6b
netfilter: nfnetlink: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
allocates the maximum size expected for all possible attrs and adds
sanity-checks at both registration and usage to make sure nothing
gets out of sync.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink.c