netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE
authorSriram Yagnaraman <sriram.yagnaraman@est.tech>
Tue, 24 Jan 2023 01:47:18 +0000 (02:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:45 +0000 (08:34 +0100)
commitecf1d4250ff4076693f9f9e9222348951b2494d2
treef06dd5f36c31544384d0e5e68959b4405c08863b
parentf0907d08bac72f84e982dcda3f3ed2fd0aa0ef8a
netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE

[ Upstream commit a9993591fa94246b16b444eea55d84c54608282a ]

RFC 9260, Sec 8.5.1 states that for ABORT/SHUTDOWN_COMPLETE, the chunk
MUST be accepted if the vtag of the packet matches its own tag and the
T bit is not set OR if it is set to its peer's vtag and the T bit is set
in chunk flags. Otherwise the packet MUST be silently dropped.

Update vtag verification for ABORT/SHUTDOWN_COMPLETE based on the above
description.

Fixes: 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.")
Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_conntrack_proto_sctp.c