Skip to content

Race condition on sequencecheck #10

@ozaki-r

Description

@ozaki-r

There is a race condition on sequencecheck between the main thread and the receiver thread. The main thread calls seqcheck_clear() on RFC2544_RESETTING while the receiver thread calls seqcheck_receive(). seqcheck_receive() tries to update sequence counters and seqcheck_clear() resets its counters. Unfortunately seqcheck_clear() makes a pointer sc_parent NULL transiently in its process, so seqcheck_receive() can touch the NULL pointer and cause a segmentation fault.

We know that a segmentation fault stemming from the race condition occurs on FreeBSD 13.

We probably have to synchronize the threads on RFC2544_RESETTING to avoid the race condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions