xfrm: Restrict SA direction attribute to specific netlink message types
authorAntony Antony <antony.antony@secunet.com>
Tue, 30 Apr 2024 07:09:45 +0000 (09:09 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 1 May 2024 08:06:59 +0000 (10:06 +0200)
commit451b509678978250702bd833c69276e70531f07a
treeda0e570b3e383fa17234a4a210a43d7c492b4000
parent304b44f0d5a4c2f91f82f7c31538d00485fb484c
xfrm: Restrict SA direction attribute to specific netlink message types

Reject the usage of the SA_DIR attribute in xfrm netlink messages when
it's not applicable. This ensures that SA_DIR is only accepted for
certain message types (NEWSA, UPDSA, and ALLOCSPI)

Signed-off-by: Antony Antony <antony.antony@secunet.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_user.c