Bug ID 1455953: The iRule "string first" command might fail to find the search string

Last Modified: Jun 12, 2024

Affected Product(s):
BIG-IP LTM(all modules)

Known Affected Versions:
14.1.0,,,,,, 14.1.2,,,,,,,,, 14.1.3,, 14.1.4,,,,,,, 14.1.5,,,,,, 15.1.0,,,,,, 15.1.1, 15.1.2,, 15.1.3,, 15.1.4,, 15.1.5,, 15.1.6,, 15.1.7, 15.1.8,,, 15.1.9,, 15.1.10,,,, 16.1.0, 16.1.1, 16.1.2,,, 16.1.3,,,,,, 16.1.4,,,, 17.1.0,,,, 17.1.1,,,

Opened: Dec 14, 2023

Severity: 3-Major


String first fails to find the search string or returns an incorrect location.


Unexpected iRule behavior with some inputs.


The "string first" command is being used in an iRule. The string being searched contains binary or Unicode data. A non-zero start index is provided. For example: set needle "needle" set haystack "my\u2022data\xc2with needle" set location [string first $needle $haystack 1] This will result in the location being set to "-1". Additionally, set location [string first $needle $haystack 2] will set the location to the incorrect location.



Fix Information


Behavior Change

Guides & references

K10134038: F5 Bug Tracker Filter Names and Tips