From: Nicolas Dichtel <hidden> Date: 2021-11-22 10:33:24
When there is no policy configured on the system, the default policy is
checked in xfrm_route_forward. However, it was done with the wrong
direction (XFRM_POLICY_FWD instead of XFRM_POLICY_OUT).
The default policy for XFRM_POLICY_FWD was checked just before, with a call
to xfrm[46]_policy_check().
CC: stable@vger.kernel.org
Fixes: 2d151d39073a ("xfrm: Add possibility to set the default to block if we have no policy")
Signed-off-by: Nicolas Dichtel <redacted>
---
include/net/xfrm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Hi Nicolas,
On Mon, Nov 22, 2021 at 11:33:13 +0100, Nicolas Dichtel wrote:
When there is no policy configured on the system, the default policy is
checked in xfrm_route_forward. However, it was done with the wrong
direction (XFRM_POLICY_FWD instead of XFRM_POLICY_OUT).
How can I reproduce this?
I tried adding fwd block and no policy and that blocked the forwarded traffic.
I ran into another issue with fwd block and and tunnel. I will double check. Next week.
From: Nicolas Dichtel <hidden> Date: 2021-11-25 08:25:22
Le 25/11/2021 à 07:57, Antony Antony a écrit :
Hi Nicolas,
Hi Antony,
On Mon, Nov 22, 2021 at 11:33:13 +0100, Nicolas Dichtel wrote:
quoted
When there is no policy configured on the system, the default policy is
checked in xfrm_route_forward. However, it was done with the wrong
direction (XFRM_POLICY_FWD instead of XFRM_POLICY_OUT).
How can I reproduce this?
I tried adding fwd block and no policy and that blocked the forwarded traffic.
I ran into another issue with fwd block and and tunnel. I will double check. Next week.
With the out default policy set to 'block' and no out policy configured, the
packets are forwarded. After my patch, packets are blocked:
$ ip xfrm policy getdefault
Default policies:
in: accept
fwd: accept
out: block
$ ip xfrm policy
$
Regards,
Nicolas
On Mon, Nov 22, 2021 at 11:33:13AM +0100, Nicolas Dichtel wrote:
When there is no policy configured on the system, the default policy is
checked in xfrm_route_forward. However, it was done with the wrong
direction (XFRM_POLICY_FWD instead of XFRM_POLICY_OUT).
The default policy for XFRM_POLICY_FWD was checked just before, with a call
to xfrm[46]_policy_check().
CC: stable@vger.kernel.org
Fixes: 2d151d39073a ("xfrm: Add possibility to set the default to block if we have no policy")
Signed-off-by: Nicolas Dichtel <redacted>