diff --git a/modules/exploits/linux/local/runc_cwd_priv_esc.rb b/modules/exploits/linux/local/runc_cwd_priv_esc.rb index 4c12b11b6dd8..267766a5f0e3 100644 --- a/modules/exploits/linux/local/runc_cwd_priv_esc.rb +++ b/modules/exploits/linux/local/runc_cwd_priv_esc.rb @@ -84,7 +84,7 @@ def check return CheckCode::Safe('The docker command was not found on this system') end - minimum_version = "1.0.0" + minimum_version = '1.0.0' version_info = cmd_exec('runc --version') case sys_info[:distro] @@ -107,9 +107,9 @@ def check elsif sys_info[:version].include? '18.04' # bionic fixed_version = '1.1.4-0ubuntu1~18.04.2+esm1' elsif sys_info[:version].include? '16.04' # xenial - return CheckCode::Safe("Ubuntu version not affected") + return CheckCode::Safe('Ubuntu version not affected') elsif sys_info[:version].include? '14.04' # trusty - return CheckCode::Detected("Patch for this Ubuntu version was ignored. (end of standard support)") + return CheckCode::Detected('Patch for this Ubuntu version was ignored. (end of standard support)') else fixed_version = '1.1.12' end @@ -150,6 +150,7 @@ def check if Rex::Version.new(runc_version) < Rex::Version.new(fixed_version) && Rex::Version.new(runc_version) >= Rex::Version.new(minimum_version) return CheckCode::Appears("Version of runc detected appears to be vulnerable: #{unfiltered_version}.") end + CheckCode::Safe("runc version #{unfiltered_version} is not vulnerable.") end