ironcore-dev / dpservice

DPDK based fast Dataplane / L3 router / SDN enabler, installable on compute nodes / SmartNICs
Apache License 2.0
7 stars 1 forks source link

Fix conntrack reference count causing double free #584

Closed guvenc closed 4 months ago

guvenc commented 4 months ago

In conntrack hashtable each conntrack entry has two keys pointing to it. (Flow 5-Tuple and Inverted Flow 5-Tuple) Therefore a better approach to delete the conntrack entry is to reference count for each pointing hashtable key and delete the conntrack entry only when there arent any keys pointing to it.

Current approach tried to delete the both keys at once when the conntrack entry was supposed to be deleted. This caused double free under some circumstances.

Fixes #583 Probably related to #513