netfilter: nf_conntrack_tcp: Fix stack out of bounds when parsing TCP options
commit 644c7e48 upstream. 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> Cc: Zubin Mithra <zsm@chromium.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Lee Jones <joneslee@google.com> Change-Id: I9d4da02ef2edea8f6b532ce8128af5010c5ea49d
Loading
Please sign in to comment