Uploaded image for project: 'Fast Datapath Product'
  1. Fast Datapath Product
  2. FDP-1433

flow.c: uninitialized memory used

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • None
    • None
    • openvswitch3.5
    • None
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • rhel-10
    • None
    • rhel-net-ovs-dpdk
    • ssg_networking
    • OVS/DPDK - FDP-25.E - 1
    • 1

      Currently pkt_metadata_init does not initialize ct_orig_tuple fields because these will be set when ct_state is set. Except that doesn't always happen, ipf can set ct_state to CS_INVALID without initializing the remaining fields, causing miniflow_extract to access uninitialized memory. This was found by  running the tests with ubsan enabled.

      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

              rh-ee-mpattric Mike Pattrick
              rh-ee-mpattric Mike Pattrick
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: