detect/byte_jump: Support bitmask value#14701
Closed
Conversation
Issue: 6693 Add bitmask support to byte_jump - Parse - Calculate shift count - Apply to value before applying multiplier - Order items in DetectBytejumpData to reduce holes. Snort: See https://github.com/chenkc/snort2.9/blob/master/snort-2.9.11.1/src/detection-plugins/sp_byte_jump.c#L780
Issue: 6693 Clarify how the bitmask value is used for byte_jump Snort compatibility says: - The bitmask value is applied to the extracted value before the multiplier is applied. - The result of the bitmask operation is to be right shifted by the number of trailing 0's in the bitmask value.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14701 +/- ##
==========================================
- Coverage 82.13% 82.10% -0.03%
==========================================
Files 1011 1011
Lines 262925 263012 +87
==========================================
- Hits 215954 215950 -4
- Misses 46971 47062 +91
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Information: QA ran without warnings. Pipeline = 29294 |
Contributor
|
I leave this for others to review as this shift does not make any sense to me |
victorjulien
approved these changes
Feb 4, 2026
Merged
Member
|
Merged in #14750, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation of #14675
Add support for the bitmask value to byte_jump
Link to ticket: https://redmine.openinfosecfoundation.org/issues/6693
Describe changes:
bitmaskvalue is used in the documentationbitmaskoptionUpdates:
paholeto eliminate gaps inDetectBytejumpDatauint8_tsince it holds values[0, 32]Provide values to any of the below to override the defaults.
link to the pull request in the respective
_BRANCHvariable.SV_REPO=
SV_BRANCH=OISF/suricata-verify#2880
SU_REPO=
SU_BRANCH=