Version in base suite: 3.4-5 Base version: needrestart_3.4-5 Target version: needrestart_3.4-5+deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/n/needrestart/needrestart_3.4-5.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/n/needrestart/needrestart_3.4-5+deb10u1.dsc changelog | 7 ++++++ patches/08-anchor-interp-re.diff | 42 +++++++++++++++++++++++++++++++++++++++ patches/series | 1 3 files changed, 50 insertions(+) diff -Nru needrestart-3.4/debian/changelog needrestart-3.4/debian/changelog --- needrestart-3.4/debian/changelog 2019-05-24 09:56:40.000000000 +0000 +++ needrestart-3.4/debian/changelog 2022-05-13 08:47:27.000000000 +0000 @@ -1,3 +1,10 @@ +needrestart (3.4-5+deb10u1) buster-security; urgency=high + + * Add patch 08-anchor-interp-re to fix not anchored regular expressions. + This fixes CVE-2022-30688. + + -- Patrick Matthäi Thu, 13 May 2022 10:47:27 +0200 + needrestart (3.4-5) unstable; urgency=medium * Remove 3.4-3~bpo9+1 changelog entry. diff -Nru needrestart-3.4/debian/patches/08-anchor-interp-re.diff needrestart-3.4/debian/patches/08-anchor-interp-re.diff --- needrestart-3.4/debian/patches/08-anchor-interp-re.diff 1970-01-01 00:00:00.000000000 +0000 +++ needrestart-3.4/debian/patches/08-anchor-interp-re.diff 2022-05-13 08:47:27.000000000 +0000 @@ -0,0 +1,42 @@ +# Upstream patch to fix not anchored regular expressions. + +diff --git a/perl/lib/NeedRestart/Interp/Perl.pm b/perl/lib/NeedRestart/Interp/Perl.pm +index 40aabb4..5031679 100644 +--- a/perl/lib/NeedRestart/Interp/Perl.pm ++++ b/perl/lib/NeedRestart/Interp/Perl.pm +@@ -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; + } +diff --git a/perl/lib/NeedRestart/Interp/Python.pm b/perl/lib/NeedRestart/Interp/Python.pm +index 559666c..a30121d 100644 +--- a/perl/lib/NeedRestart/Interp/Python.pm ++++ b/perl/lib/NeedRestart/Interp/Python.pm +@@ -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; + } +diff --git a/perl/lib/NeedRestart/Interp/Ruby.pm b/perl/lib/NeedRestart/Interp/Ruby.pm +index d02973d..72920f3 100644 +--- a/perl/lib/NeedRestart/Interp/Ruby.pm ++++ b/perl/lib/NeedRestart/Interp/Ruby.pm +@@ -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; + } + diff -Nru needrestart-3.4/debian/patches/series needrestart-3.4/debian/patches/series --- needrestart-3.4/debian/patches/series 2019-05-24 09:56:40.000000000 +0000 +++ needrestart-3.4/debian/patches/series 2022-05-13 08:47:27.000000000 +0000 @@ -3,3 +3,4 @@ 03-typo-env-var.diff 04-restore-cwd.diff 05-strip-leading-zeroes.diff +08-anchor-interp-re.diff