[PATCH v2] xfrm: Fix wraparound in xfrm_policy_addr_delta()

2020-12-30 Thread Visa Hankala
. Fixes: 9cf545ebd591d ("xfrm: policy: store inexact policies in a tree ordered by destination address") Signed-off-by: Visa Hankala --- net/xfrm/xfrm_policy.c | 26 + tools/testing/selftests/net/xfrm_policy.sh | 43 ++ 2 files c

Re: [PATCH] xfrm: Fix wraparound in xfrm_policy_addr_delta()

2020-12-30 Thread Visa Hankala
On Tue, Dec 29, 2020 at 05:01:27PM +0100, Florian Westphal wrote: > Visa Hankala wrote: > > Use three-way comparison for address elements to avoid integer > > wraparound in the result of xfrm_policy_addr_delta(). > > > > This ensures that the search trees are bu

[PATCH] xfrm: Fix wraparound in xfrm_policy_addr_delta()

2020-12-29 Thread Visa Hankala
;xfrm: policy: store inexact policies in a tree ordered by destination address") Signed-off-by: Visa Hankala diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index d622c2548d22..d74902f11dde 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -793,15 +793,20 @@