Skip to content

Commit

Permalink
[Interp] CVE-2022-30688: Anchor interpreter regex to prevent local pr…
Browse files Browse the repository at this point in the history
…ivilege escalation (reported by Jakub Wilk).
  • Loading branch information
liske committed May 17, 2022
1 parent f54d85c commit e6e5813
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion perl/lib/NeedRestart/Interp/Perl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sub isa {
my $pid = shift;
my $bin = shift;

return 1 if($bin =~ m@/usr/(local/)?bin/perl@);
return 1 if($bin =~ m@^/usr/(local/)?bin/perl(5[.\d]*)?$@);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/NeedRestart/Interp/Python.pm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ sub isa {
my $pid = shift;
my $bin = shift;

return 1 if($bin =~ m@/usr/(local/)?bin/python@);
return 1 if($bin =~ m@^/usr/(local/)?bin/python([23][.\d]*)?$@);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/NeedRestart/Interp/Ruby.pm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ sub isa {
my $pid = shift;
my $bin = shift;

return 1 if($bin =~ m@/usr/(local/)?bin/ruby@);
return 1 if($bin =~ m@^/usr/(local/)?bin/ruby$@);

return 0;
}
Expand Down

0 comments on commit e6e5813

Please sign in to comment.