Eelco Chaudron via dev <[email protected]> writes:

> On 1 Apr 2026, at 21:03, Aaron Conole via dev wrote:
>
>> The regex_if_macros accidentally implements a catastrophic backtracking
>> case during matching because it forces a greedy match and evaluation that
>> causes an explosion of combinations depending on how many blocks appear
>> in a parenthesized expression.
>>
>> Consider an expression like:
>>
>>   if (a b c d e f g h i j k) {
>>
>> The regex engine will have to create an exponential number of matches that
>> can overload memory and cpu requirements.
>>
>> Fix this by switching the inner-content match to use a non-greedy approach.
>>
>> Fixes: aacad8685e3d ("checkpatch: Fix regexp for if, while, etc
>> inside macros.")
>> Signed-off-by: Aaron Conole <[email protected]>
>
> Thanks for taking care of this Aaron!
>
> The patch looks good to me.
>
> Acked-by: Eelco Chaudron <[email protected]>

Thanks Eelco - Applied!

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to