Uploaded image for project: 'EtherNet/IP Core V3'
  1. EtherNet/IP Core V3
  2. PSEIP-1132

Timer race condition results in firmware crash

    Details

    • Sprint:
      EIP PI8-IT4 (Nov 10 - Nov 21)
    • Account:
      SPC EthernetIp Core (SPCETHERNET)

      Description

      A use-after-free condition may occur due to scheduler contention between the EipTimer_Delete() function and an already-enqueued EipTimer_SlowExpiry() job. Under this race condition, a timer that has been deleted may still fire, leading to invalid memory access within the timer expiry handler and ultimately causing a firmware crash.

      The issue occurs when EipTimer_Delete() removes a timer object while a corresponding EipTimer_SlowExpiry() job remains queued in the scheduler, under certain further conditions.

      If the queued expiry job executes after the timer has been freed, under ceratin conditions, a use-after-free situation arises. This behavior has been observed for the TX timer during FwOpen/FwClose long-term testing of both, the netX90 and netX51/52 targets.

      ETM tracing on netX51 revealed a coding error related to mutex handling in the timer module as the cause, which can lead to spurious executions of already deleted timers.

        Attachments

          Issue Links

            Expenses

              Activity

                Status Description

                  People

                  • Reporter:
                    MBommert Marc Bommert
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    0 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved: