]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack_tcp: Fix stack out of bounds when parsing TCP options
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 30 Mar 2016 09:34:35 +0000 (11:34 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 7 Apr 2016 16:42:37 +0000 (18:42 +0200)
commit0ea1b1900202aac475af4a8968a76abea85b8679
treecb2ca7427bab0e28fe097ae6a08acd416c63eccd
parenta96d6e032e141dc873f8de22cf0f3796b1425b13
netfilter: nf_conntrack_tcp: Fix stack out of bounds when parsing TCP options

Baozeng Ding reported a KASAN stack out of bounds issue - it uncovered that
the TCP option parsing routines in netfilter TCP connection tracking could
read one byte out of the buffer of the TCP options.  Therefore in the patch
we check that the available data length is large enough to parse both TCP
option code and size.

Reported-by: Baozeng Ding <sploving1@gmail.com>
Tested-by: Baozeng Ding <sploving1@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_proto_tcp.c