OSDN Git Service

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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 30 Aug 2023 15:34:01 +0000 (17:34 +0200)
commite99476497687ef9e850748fe6d232264f30bc8f9
treeeafd37b4040d86c4a783de8fe2aaa11451afbb0c
parent28427f368f0e08d504ed06e74bc7cc79d6d06511
netfilter: xt_sctp: validate the flag_info count

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>
net/netfilter/xt_sctp.c