Hrm, somehow the ist was dropped from the reply chain.  Adding back.

On 5/28/25 3:53 PM, Ilya Maximets wrote:
> On 5/28/25 2:47 PM, Aaron Conole via dev wrote:
>> Mike Pattrick via dev <ovs-dev@openvswitch.org> writes:
>>
>>> Previously ct_orig_tuple information was removed from packet metadata
>>> initialization with the theory that it would always be set correctly if
>>> ct_state was set.
>>>
>>> However, there are some cases where ct_state is set without setting this
>>> value in ipf. This leads to an uninitialized value being used in
>>> miniflow_extract. This was identified through ubsan:
>>>
>>> lib/flow.c:900:35: runtime error: load of value 190, which is not a
>>> valid value for type 'bool'
>>>     lib/flow.c:900   miniflow_extract
>>>     lib/dpif-netdev.c:8317   dfc_processing
>>>     lib/dpif-netdev.c:8598   dp_netdev_input__
>>>     lib/dpif-netdev.c:8650   dp_netdev_recirculate
>>>     lib/dpif-netdev.c:9045   dp_execute_cb
>>>     lib/odp-execute.c:890    odp_actions_impl_set
>>>     lib/dpif-netdev.c:9231   dp_netdev_execute_actions
>>>     lib/dpif-netdev.c:8419   handle_packet_upcall
>>>     lib/dpif-netdev.c:8515   fast_path_processing
>>>     lib/dpif-netdev.c:8604   dp_netdev_input__
>>>     lib/dpif-netdev.c:8642   dp_netdev_input
>>>     lib/dpif-netdev.c:5423   dp_netdev_process_rxq_port
>>>     lib/dpif-netdev.c:6758   dpif_netdev_run
>>>
>>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior lib/flow.c:900:35
>>>
>>> Reported-at: https://issues.redhat.com/browse/FDP-1433
>>> Fixes: af697f26b51b ("packets: Do not initialize ct_orig_tuple.")
>>> Signed-off-by: Mike Pattrick <m...@redhat.com>
>>> ---
>>
>> Good catch.
>>
>> Acked-by: Aaron Conole <acon...@redhat.com>
> 
> Doesn't write_ct_md(packet, zone, NULL, NULL, NULL); call later clear these 
> up?
> 
> Also, why are we not clearing mark and label as well here?  They are accessed
> unconditionally by the miniflow_extract as well and at least label is beyond
> the original memset.
> 
> Also, the fixes tag seems wrong.  The mentioned commit is way older than the
> fragmentation engine.
> 
> Best regards, Ilya Maximets.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to