Project

General

Profile

Actions

Bug #802

closed

deadlock in flowvar capture code (master)

Added by Victor Julien about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

See #801

Actions #1

Updated by Victor Julien about 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Fixed by:

commit 00a691fc1b1960d444d21125d21890143ebb6d30
Author: Victor Julien <victor@inliniac.net>
Date:   Wed Apr 17 11:58:00 2013 +0200

    flowvar: clean up properly on signature clean up.

commit 70e2adeb01b0d20a76d8f599480b5dfa8ec411c5
Author: Victor Julien <victor@inliniac.net>
Date:   Wed Apr 17 11:05:08 2013 +0200

    flowvar: add unittests for #802.

commit 4cd736fcc9d0e0218ec32037100212a8db158f1b
Author: Victor Julien <victor@inliniac.net>
Date:   Tue Apr 16 21:47:42 2013 +0200

    flowvar: fix deadlock with http buffers

    Bug #802

    Flowvars are set from pcre, and lock the flow when being set. However
    when HTTP buffers were inspected, flow was already locked: deadlock.

    This patch introduces a post-match list in the detection engine thread
    ctx, where store candidates are kept. Then a post-match function is used
    to finalize the storing if the rule matches.

    Solves the deadlock and brings the handling of flowvars more in line
    with flowbits and flowints.

commit 4c2e6a84026baeb551675470f2e5357be8bf8889
Author: Victor Julien <victor@inliniac.net>
Date:   Tue Apr 16 14:53:23 2013 +0200

    flowvars: update funcs to accept u16 id

    All id's are u16, but flowvar functions would only accept u8.

    Minor cleanups.

-----------------------------------------------------------------------

Summary of changes:
 src/detect-flowvar.c |  143 ++++++++++++++++++-
 src/detect-flowvar.h |    4 +
 src/detect-pcre.c    |  391 +++++++++++++++++++++++++++++++++++++++++++++++++-
 src/detect.c         |    1 +
 src/detect.h         |   13 ++
 src/flow-var.c       |   30 ++---
 src/flow-var.h       |   23 ++--
 7 files changed, 573 insertions(+), 32 deletions(-)

Actions

Also available in: Atom PDF