Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24903

Unabortable builds due to catastrophic backtracking regular expression

    Details

    • Similar Issues:

      Description

      If the user enters a regular expression which results in catastrophic backtracking, the regular expression will run "forever" and the user will not be able to abort the build.

      The attached config.xml demonstrates the issue.

      The solution is to use an interruptible character sequence.

        Attachments

          Activity

          recampbell Ryan Campbell created issue -
          recampbell Ryan Campbell made changes -
          Field Original Value New Value
          Description If the user enters a regular expression which results in [catastrophic backtracking](http://www.rexegg.com/regex-explosive-quantifiers.html), the regular expression will run "forever" and the user will not be able to kill the build.

          The attached config.xml demonstrates the issue.

          The solution is to use an [interruptible character sequence[(http://ocpsoft.org/regex/how-to-interrupt-a-long-running-infinite-java-regular-expression/).
          If the user enters a regular expression which results in [catastrophic backtracking|http://www.rexegg.com/regex-explosive-quantifiers.html], the regular expression will run "forever" and the user will not be able to kill the build.

          The attached config.xml demonstrates the issue.

          The solution is to use an [interruptible character sequence|http://ocpsoft.org/regex/how-to-interrupt-a-long-running-infinite-java-regular-expression/].
          recampbell Ryan Campbell made changes -
          Summary Unkillable builds due to catastrophic backtracking regular expression Unabortable builds due to catastrophic backtracking regular expression
          Description If the user enters a regular expression which results in [catastrophic backtracking|http://www.rexegg.com/regex-explosive-quantifiers.html], the regular expression will run "forever" and the user will not be able to kill the build.

          The attached config.xml demonstrates the issue.

          The solution is to use an [interruptible character sequence|http://ocpsoft.org/regex/how-to-interrupt-a-long-running-infinite-java-regular-expression/].
          If the user enters a regular expression which results in [catastrophic backtracking|http://www.rexegg.com/regex-explosive-quantifiers.html], the regular expression will run "forever" and the user will not be able to abort the build.

          The attached config.xml demonstrates the issue.

          The solution is to use an [interruptible character sequence|http://ocpsoft.org/regex/how-to-interrupt-a-long-running-infinite-java-regular-expression/].
          Show
          ikedam ikedam added a comment - https://github.com/jenkinsci/naginator-plugin/pull/23
          ikedam ikedam made changes -
          Assignee Nicolas De Loof [ ndeloof ] ikedam [ ikedam ]
          ikedam ikedam made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
          http://jenkins-ci.org/commit/naginator-plugin/4012e4cd8b6a22c9e7ff534d46d7d4058e42fd20
          Log:
          JENKINS-24903 Added a test to reproduce a catastrophic backtracking regular expression.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java http://jenkins-ci.org/commit/naginator-plugin/4012e4cd8b6a22c9e7ff534d46d7d4058e42fd20 Log: JENKINS-24903 Added a test to reproduce a catastrophic backtracking regular expression.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java
          http://jenkins-ci.org/commit/naginator-plugin/c4aff2b88aa6e1fd6e23bc8dccfcad4f710ebf47
          Log:
          [FIXED JENKINS-24903] Aborts too long running regular expressions. Added a configuration field for the timeout.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java http://jenkins-ci.org/commit/naginator-plugin/c4aff2b88aa6e1fd6e23bc8dccfcad4f710ebf47 Log: [FIXED JENKINS-24903] Aborts too long running regular expressions. Added a configuration field for the timeout.
          scm_issue_link SCM/JIRA link daemon made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java
          http://jenkins-ci.org/commit/naginator-plugin/d86ff5bf9adb47c7911d1c83a28b1c43c67946a7
          Log:
          Merge pull request #23 from ikedam/feature/JENKINS-24903_InfiniteRegularExpression

          JENKINS-24903 Aborts long running regular expressions

          Compare: https://github.com/jenkinsci/naginator-plugin/compare/888e8f4bb808...d86ff5bf9adb

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java http://jenkins-ci.org/commit/naginator-plugin/d86ff5bf9adb47c7911d1c83a28b1c43c67946a7 Log: Merge pull request #23 from ikedam/feature/ JENKINS-24903 _InfiniteRegularExpression JENKINS-24903 Aborts long running regular expressions Compare: https://github.com/jenkinsci/naginator-plugin/compare/888e8f4bb808...d86ff5bf9adb
          Hide
          ikedam ikedam added a comment -

          Fixed in 1.16.1.
          It will be available in the update center in a day.

          Show
          ikedam ikedam added a comment - Fixed in 1.16.1. It will be available in the update center in a day.
          ikedam ikedam made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 158541 ] JNJira + In-Review [ 208084 ]

            People

            • Assignee:
              ikedam ikedam
              Reporter:
              recampbell Ryan Campbell
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: