]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_socket: fix a stack corruption bug
authorEric Dumazet <edumazet@google.com>
Mon, 16 Feb 2015 03:03:45 +0000 (19:03 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 16 Feb 2015 16:00:48 +0000 (17:00 +0100)
commit67e9afea028fe405f8456f171b97c6c1d1eda586
treebb6b737655d6412e4fb49c0a746f743691e81a24
parentec59aa7b1a3f3cc153781ae930bb434b4b0f7eb8
netfilter: xt_socket: fix a stack corruption bug

As soon as extract_icmp6_fields() returns, its local storage (automatic
variables) is deallocated and can be overwritten.

Lets add an additional parameter to make sure storage is valid long
enough.

While we are at it, adds some const qualifiers.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: e0d9e2aea7937 ("tproxy: added IPv6 support to the socket match")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_socket.c