Help us enhance your Sophos Community experience. Share your thoughts in our Sophos Community survey.

[9.191][BUG] HTTP Proxy "exceeded pcre limit on ..." reached

If I try to register on the hp website online shop https://h20386.www2.hp.com/SwitzerlandStore/Merch/SimpleRegistration.aspx, it will not work due following messages:


2013:12:27-11:28:12 asg01 httpproxy[6397]: id="0003" severity="info" sys="SecureWeb" sub="http" request="0xbc50020" function="match_exception_domainlist" file="profile.c" line="611" message="exception No Countryblocking exceeded pcre limit on met2.hp.com/.../s14031337932683
2013:12:27-11:28:12 asg01 httpproxy[6397]: id="0003" severity="info" sys="SecureWeb" sub="http" request="0xbc50020" function="match_exception_domainlist" file="profile.c" line="611" message="exception DELL Updates exceeded pcre limit on met2.hp.com/.../s14031337932683
2013:12:27-11:28:12 asg01 httpproxy[6397]: id="0003" severity="info" sys="SecureWeb" sub="http" request="0xbc50020" function="match_exception_domainlist" file="profile.c" line="611" message="exception APPLE EXCEPTIONS exceeded pcre limit on met2.hp.com/.../s14031337932683
2013:12:27-11:28:12 asg01 httpproxy[6397]: id="0003" severity="info" sys="SecureWeb" sub="http" request="0xbc50020" function="match_exception_domainlist" file="profile.c" line="611" message="exception SUN JAVA Updates exceeded pcre limit on met2.hp.com/.../s14031337932683
2013:12:27-11:28:12 asg01 httpproxy[6397]: id="0003" severity="info" sys="SecureWeb" sub="http" request="0xbc50020" function="match_exception_domainlist" file="profile.c" line="611" message="exception ADOBE EXCEPTIONS exceeded pcre limit on met2.hp.com/.../s14031337932683
2013:12:27-11:28:12 asg01 httpproxy[6397]: id="0003" severity="info" sys="SecureWeb" sub="http" request="0xbc50020" function="match_exception_domainlist" file="profile.c" line="611" message="exception NITENDO WII exceeded pcre limit on met2.hp.com/.../s14031337932683
2013:12:27-11:28:12 asg01 httpproxy[6397]: id="0003" severity="info" sys="SecureWeb" sub="http" request="0xbc50020" function="match_exception_domainlist" file="profile.c" line="611" message="exception Shoutcast exceeded pcre limit on met2.hp.com/.../s14031337932683


Somehow all this informations in the URL will make it's size little too big for the pcre scanner ?
Parents
  • Additional information:

    IE maximum URL length is roughly 2048 characters.  UTM maximum URL length is 2048 characters.

    This URL in question is 1700 characters, which is under the limit but also getting closer to it.

    The part of the system that is having problems is the PCRE - Perl Compatible Regular Expressions, a standard perl component.  PCRE is giving an amount of memory it can use (stack).  Depending on the URL *and* the complexity of the regular expression it needs to use different amounts of memory.  So if you have URL that is 2000 characters long and a simple regex ('aaaa') then it can do it in the memory space just fine.  But you could have a short URL (1000 characters) and an exceedingly complex regex that could cause it to run out of memory.

    So this isn't really about increasing the number of characters we support in a URL.  It is about making sure that there is enough assigned memory to PCRE that the regex that come out of the box can handle the maximum length of URL.  And balance that with the other memory constraints.

    However if someone wrote their own regex that was more complex it could break again.
    Runaway Regular Expressions: Catastrophic Backtracking
Reply
  • Additional information:

    IE maximum URL length is roughly 2048 characters.  UTM maximum URL length is 2048 characters.

    This URL in question is 1700 characters, which is under the limit but also getting closer to it.

    The part of the system that is having problems is the PCRE - Perl Compatible Regular Expressions, a standard perl component.  PCRE is giving an amount of memory it can use (stack).  Depending on the URL *and* the complexity of the regular expression it needs to use different amounts of memory.  So if you have URL that is 2000 characters long and a simple regex ('aaaa') then it can do it in the memory space just fine.  But you could have a short URL (1000 characters) and an exceedingly complex regex that could cause it to run out of memory.

    So this isn't really about increasing the number of characters we support in a URL.  It is about making sure that there is enough assigned memory to PCRE that the regex that come out of the box can handle the maximum length of URL.  And balance that with the other memory constraints.

    However if someone wrote their own regex that was more complex it could break again.
    Runaway Regular Expressions: Catastrophic Backtracking
Children
No Data