Re: [ovs-dev] [PATCH 2/5] ofproto: Avoid use-after-free on error path in ofproto_flow_mod_learn().

2018-01-26 Thread William Tu
On Thu, Jan 25, 2018 at 3:39 PM, Ben Pfaff wrote: > In the case where the learned flow limit has been reached (below_limit == > false), ofproto_flow_mod_uninit() would unref ofm->temp_rule (which is > also in the 'rule' local variable) before dereferencing rule->flow_cookie > for

[ovs-dev] [PATCH 2/5] ofproto: Avoid use-after-free on error path in ofproto_flow_mod_learn().

2018-01-25 Thread Ben Pfaff
In the case where the learned flow limit has been reached (below_limit == false), ofproto_flow_mod_uninit() would unref ofm->temp_rule (which is also in the 'rule' local variable) before dereferencing rule->flow_cookie for the log message. This fixes the problem. (The greatest likely consequence