Skip to content

PCRE limit exceeded #1176

Closed
Closed
@quenenni

Description

@quenenni

Server: Debian Wheezy
libapache2-mod-security2: v2.8.0-2~bpo70+1
modsec rules: v3


On our new server, with for the moment only few low traffic websites, I have lots of "PCRE limits exceeded".
On our old server, I thought it normal as it was not a powerful one anymore and lots of websites on it.

But here, I wonder why I have so many.

I already updated the directives SecPcreMatchLimit & SecPcreMatchLimitRecursion to 2000 to see if there is a difference.

And I'm afraid that it will become a problem later when all the websites will have been migrated on this new server.

The rules that generate these PCRE errors are:
(between () is the number of times for each)

"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "100"] -> id:951120 (131)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "280"] -> id:951180 (19)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "311"] -> id:951190 (122)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "372"] -> id:951210 (122)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "402"] -> id:951220  (138)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "432"] -> id:951230 (122)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "462"] -> id:951240 (122)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "492"] -> id:951250 (131)
"/etc/modsecurity/RESPONSE-51-DATA-LEAKAGES-SQL.conf"][line "522"] -> id:951260 (122)

Total: 1029 out of 1144
"/etc/modsecurity/REQUEST-41-APPLICATION-ATTACK-XSS.conf"][line "211"] -> id:941140 (12)
"/etc/modsecurity/REQUEST-41-APPLICATION-ATTACK-XSS.conf"][line "249"] -> id:941150 (6)
"/etc/modsecurity/REQUEST-41-APPLICATION-ATTACK-XSS.conf"][line "286"] -> id:941160 (20)
"/etc/modsecurity/REQUEST-41-APPLICATION-ATTACK-XSS.conf"][line "415"] -> id:941200 (16)
"/etc/modsecurity/REQUEST-41-APPLICATION-ATTACK-XSS.conf"][line "739"] -> id:941310 (24)
"/etc/modsecurity/REQUEST-41-APPLICATION-ATTACK-XSS.conf"][line "856"] -> id:941330 (16)

Total: 94 out of 1144
"/etc/modsecurity/REQUEST-42-APPLICATION-ATTACK-SQLI.conf"][line "242"] -> id:942240 (7)
"/etc/modsecurity/REQUEST-42-APPLICATION-ATTACK-SQLI.conf"][line "265"] -> id:942250 (7)
"/etc/modsecurity/REQUEST-42-APPLICATION-ATTACK-SQLI.conf"][line "617"] -> id:942210 (7)

Total: 21 out of 1144

Can I change the directives SecPcreMatchLimit & SecPcreMatchLimitRecursion to a higher number?
Won't be that a problem for performances later when the server will have plenty of websites?

Is there any other variable I can play with?

I attached modsec logs for each of these errors.

PCRE-REQUEST-41-APPLICATION-ATTACK-XSS.txt
PCRE-REQUEST-42-APPLICATION-ATTACK-SQLI.txt
PCRE-RESPONSE-51-DATA-LEAKAGES-SQL.txt

Metadata

Metadata

Assignees

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