From 3328e9011463855b5b2d52b849cff3114d264b68 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 29 Aug 2018 17:23:03 +0200 Subject: acl-plugin: VPP-1400: VPP may crash when performing ACL modifications on applied ACLs The partition_split() did not increment the refcount when using a mask type index, thus subsequent modifications potentially resulted in double frees and in the best case immediate crash, in the worst case delayed crash in another place. Introduce the lock_mask_type_index() and call it, move the mask type index related functions closer to the top of the file. Make the assignment of the new mask type indices for the tuplemerge case to use the assign_mask_type_index(). Keep some debugs in case we need to investigate this further at some point. Change-Id: Iae370f5cd92e1fe1442480db34656a8a3442dbc0 Signed-off-by: Andrew Yourtchenko (cherry picked from commit 1edc406da3d4f6e63de2f278360b5753f55c00df) --- src/plugins/acl/acl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/acl/acl.h') diff --git a/src/plugins/acl/acl.h b/src/plugins/acl/acl.h index b994b8506b7..d030681ac3a 100644 --- a/src/plugins/acl/acl.h +++ b/src/plugins/acl/acl.h @@ -122,6 +122,7 @@ typedef struct CLIB_CACHE_LINE_ALIGN_MARK(cacheline0); fa_5tuple_t mask; u32 refcount; + u8 from_tm; } ace_mask_type_entry_t; typedef struct { -- cgit 1.2.3-korg