|
Ran
|
Files
450
|
Run time
22s
|
Badge
README BADGES
|
push
travis-ci
Merge branch '5.6.z/fix/miq-expression-regexp-vulnerability' into '5.6.z' Sanitize regex expressions from /s and #{}s Both REGULAR EXPRESSION MATCHES and REGULAR EXPRESSION DOES NOT MATCH have a vulnerability whereby a regular expression can be terminated in the first part of the string that gets eval'd, allowing any arbitrary Ruby code to be run. They are also vulnerable to interpolation, wherein any arbitrary Ruby code can get executed. Unfortunately it is not possible to run these values through the existing `MiqExpression.re_escape` method, since it also escapes special characters which are essential to the user's forming real regular expressions through the UI. Because we are currently supporting values with or without the actual bona fide delimiters present, and also regular expressions with one option (e.g. `/abc/i`), we have to code several paths to ensure that we escape only unescaped forward slashes that are not part of the bona fide regular expression literal syntax. Addresses CVE-2016-7040 https://bugzilla.redhat.com/show_bug.cgi?id=1376878 See merge request !1045 (cherry picked from commit 92d5b5e8e)
13171 of 21718 relevant lines covered (60.65%)
153.46 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|