]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_TCPOPTSTRIP: fix possible mangling beyond packet boundary
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 7 May 2013 01:22:18 +0000 (03:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 16 May 2013 15:35:53 +0000 (17:35 +0200)
commit55bda6c03165bee75401a5cbb226beab8c1cb552
tree1305eb74bb354d76cc815910a3ebe1f803b7a6f4
parent8324c1d8972a0ccd452af50623d2070b0308a4bd
netfilter: xt_TCPOPTSTRIP: fix possible mangling beyond packet boundary

This target assumes that tcph->doff is well-formed, that may be well
not the case. Add extra sanity checkings to avoid possible crash due
to read/write out of the real packet boundary. After this patch, the
default action on malformed TCP packets is to drop them. Moreover,
fragments are skipped.

Reported-by: Rafal Kupka <rkupka@telemetry.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_TCPOPTSTRIP.c