Commit 09b57136 authored by Benedict Wong's avatar Benedict Wong Committed by Yongqiang Liu
Browse files

xfrm: Check if_id in inbound policy/secpath match

stable inclusion
from stable-v4.19.285
commit d3d8a6999c0839b54edfd6d7772a580ea3608f75
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7J5UF


CVE: NA

--------------------------------

[ Upstream commit 8680407b ]

This change ensures that if configured in the policy, the if_id set in
the policy and secpath states match during the inbound policy check.
Without this, there is potential for ambiguity where entries in the
secpath differing by only the if_id could be mismatched.

Notably, this is checked in the outbound direction when resolving
templates to SAs, but not on the inbound path when matching SAs and
policies.

Test: Tested against Android kernel unit tests & CTS
Signed-off-by: default avatarBenedict Wong <benedictwong@google.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 2886ed97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment