]> git.hungrycats.org Git - linux/commit
netfilter: xt_sctp: validate the flag_info count
authorWander Lairson Costa <wander@redhat.com>
Mon, 28 Aug 2023 22:12:55 +0000 (19:12 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:37 +0000 (09:48 +0200)
commitb63b4e114593073a1c25087526782258c9dd5347
treeec4dfea8a0262c2fd89843bab6e9d06da920ab05
parent83b995321eaaa0176041d9d79c7d0415cb6ed7e1
netfilter: xt_sctp: validate the flag_info count

commit e99476497687ef9e850748fe6d232264f30bc8f9 upstream.

sctp_mt_check doesn't validate the flag_count field. An attacker can
take advantage of that to trigger a OOB read and leak memory
information.

Add the field validation in the checkentry function.

Fixes: 2e4e6a17af35 ("[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables")
Cc: stable@vger.kernel.org
Reported-by: Lucas Leong <wmliang@infosec.exchange>
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/xt_sctp.c