Skip to content

ARM64 HS_FLAG_DOTALL causing false negatives #382

@Blueblood1

Description

@Blueblood1

Hi, we believe we have encountered a bug with Vectorscan's ARM support.

Tested with chips: AWS Graviton, Apple M1 Pro, Apple M4 Pro

Seen on version: 5.4.12

With HS_FLAG_DOTALL

pattern: curl.*\|\s*python

input: curl http://xxx:8000/ 2>&1 | python ✅ Match
input: curl http://xxxx:8000/ 2>&1 | python ❌ No match
input: curl http://vader:8080/ 2>&1 | python ❌ No mach

Without HS_FLAG_DOTALL

pattern: curl.*\|\s*python

input: curl http://xxx:8000/ 2>&1 | python ✅ Match
input: curl http://xxxx:8000/ 2>&1 | python ✅ Match
input: curl http://vader:8080/ 2>&1 | python ✅ Match

With PCRE all match.

On x86 with Hyperscan 5.4.2 all match.

Note: We haven't tried Vectorscan on x86, only on ARM.

I've added some unit tests here, 3 of which are failing.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions