Patch "xfrm: Allow transport-mode states with AF_UNSPEC selector" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xfrm: Allow transport-mode states with AF_UNSPEC selector

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfrm-allow-transport-mode-states-with-af_unspec-sele.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8aff5b01ad3087d71db479db47757e6de325b7ab
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date:   Tue Feb 21 13:54:00 2023 +0800

    xfrm: Allow transport-mode states with AF_UNSPEC selector
    
    [ Upstream commit c276a706ea1f51cf9723ed8484feceaf961b8f89 ]
    
    xfrm state selectors are matched against the inner-most flow
    which can be of any address family.  Therefore middle states
    in nested configurations need to carry a wildcard selector in
    order to work at all.
    
    However, this is currently forbidden for transport-mode states.
    
    Fix this by removing the unnecessary check.
    
    Fixes: 13996378e658 ("[IPSEC]: Rename mode to outer_mode and add inner_mode")
    Reported-by: David George <David.George@xxxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Steffen Klassert <steffen.klassert@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index fdbd56ed4bd52..ba73014805a4f 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2611,9 +2611,6 @@ int __xfrm_init_state(struct xfrm_state *x, bool init_replay, bool offload)
 		if (inner_mode == NULL)
 			goto error;
 
-		if (!(inner_mode->flags & XFRM_MODE_FLAG_TUNNEL))
-			goto error;
-
 		x->inner_mode = *inner_mode;
 
 		if (x->props.family == AF_INET)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux