OpenFastPath / ofp

OpenFastPath project
BSD 3-Clause "New" or "Revised" License
349 stars 126 forks source link

Potential odp_packet_t double free #265

Closed QinLongFei closed 3 years ago

QinLongFei commented 3 years ago

In ofp_packet_input, if pkt_func return OFP_PKT_DROP, this packet will be freed. But after that, it will be freed again in ofp_sp_input if SP is not defined.

image

bogdanPricope commented 3 years ago

If res is OFP_PKT_DROP then is not OFP_PKT_CONTINUE. So return will be called.

if (res != OFP_PKT_CONTINUE)
    return res;
QinLongFei commented 3 years ago

You are right! Thanks