[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1050542: marked as done (bookworm-pu: package openbsd-inetd/0.20221205-2+deb12u1)



Your message dated Mon, 28 Aug 2023 19:17:18 +0000
with message-id <E1qahji-007VnX-CO@fasolo.debian.org>
and subject line Bug#1050542: fixed in openbsd-inetd 0.20221205-2~deb12u1
has caused the Debian Bug report #1050542,
regarding bookworm-pu: package openbsd-inetd/0.20221205-2+deb12u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1050542: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050542
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
Control: affects -1 + src:openbsd-inetd

This is needed to fix #1050208, introduced in bookworm, which makes 
inetd crash on configuration reloads.

The fix is in the change to patches/default_v4v6, everything else is 
improvements to the test suite and more tests (also to catch this 
specific problem).

0.20221205-2+deb12u1 is a no changes rebuild of the package currently in 
testing.

For a better view of the changes please see
https://salsa.debian.org/md/openbsd-inetd/-/commits/master .

-- 
ciao,
Marco
diff -Nru openbsd-inetd-0.20221205/debian/changelog openbsd-inetd-0.20221205/debian/changelog
--- openbsd-inetd-0.20221205/debian/changelog	2023-01-02 14:33:50.000000000 +0100
+++ openbsd-inetd-0.20221205/debian/changelog	2023-08-26 00:34:16.000000000 +0200
@@ -1,8 +1,21 @@
+openbsd-inetd (0.20221205-2+deb12u1) bookworm; urgency=medium
+
+  * Rebuilt for bookworm.
+
+ -- Marco d'Itri <md@linux.it>  Sat, 26 Aug 2023 00:34:16 +0200
+
+openbsd-inetd (0.20221205-2) unstable; urgency=medium
+
+  * Updated the Debian patch default_v4v6 to fix fix a double free and
+    a memory leak on configuration reloads. (Closes: #1050208)
+
+ -- Marco d'Itri <md@linux.it>  Wed, 23 Aug 2023 12:49:41 +0200
+
 openbsd-inetd (0.20221205-1) unstable; urgency=medium
 
   * New CVS snapshot.
   * When just "tcp" or "udp" is specified in inetd.conf, now inetd defaults
-    to runnning two servers: one for IPv4 and one for IPv6 traffic.
+    to running two servers: one for IPv4 and one for IPv6 traffic.
     This is identical to specifying both e.g. "tcp4" and "tcp6".
     The old semantics of only accepting IPv4 connections can be restored
     by using "tcp4" or "udp4".
diff -Nru openbsd-inetd-0.20221205/debian/copyright openbsd-inetd-0.20221205/debian/copyright
--- openbsd-inetd-0.20221205/debian/copyright	2023-01-01 22:49:25.000000000 +0100
+++ openbsd-inetd-0.20221205/debian/copyright	2023-08-23 03:00:22.000000000 +0200
@@ -29,10 +29,3 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
 
-setproctitle.c and discard_stupid_environment() come from netkit 0.17,
-patched by the USAGI project.
-
-strlcpy.c comes from the openbsd source tree, slightly edited.
-
-bsd-closefrom.c comes from the openssh source tree, slightly edited.
-
diff -Nru openbsd-inetd-0.20221205/debian/NEWS openbsd-inetd-0.20221205/debian/NEWS
--- openbsd-inetd-0.20221205/debian/NEWS	2023-01-02 03:09:21.000000000 +0100
+++ openbsd-inetd-0.20221205/debian/NEWS	2023-08-23 12:46:59.000000000 +0200
@@ -1,7 +1,7 @@
 openbsd-inetd (0.20221205-1) unstable; urgency=medium
 
   * When just "tcp" or "udp" is specified in inetd.conf, now inetd defaults
-    to runnning two servers: one for IPv4 and one for IPv6 traffic.
+    to running two servers: one for IPv4 and one for IPv6 traffic.
     This is identical to specifying both e.g. "tcp4" and "tcp6".
     The old semantics of only accepting IPv4 connections can be restored
     by using "tcp4" or "udp4".
diff -Nru openbsd-inetd-0.20221205/debian/openbsd-inetd.preinst openbsd-inetd-0.20221205/debian/openbsd-inetd.preinst
--- openbsd-inetd-0.20221205/debian/openbsd-inetd.preinst	2023-01-02 02:45:43.000000000 +0100
+++ openbsd-inetd-0.20221205/debian/openbsd-inetd.preinst	2023-08-23 03:06:12.000000000 +0200
@@ -54,14 +54,6 @@
     install)
     create_inetd
     ;;
-
-    upgrade|abort-upgrade)
-    ;;
-
-    *)
-    echo "$0 called with unknown argument '$1'" >&2
-    exit 1
-    ;;
 esac
 
 #DEBHELPER#
diff -Nru openbsd-inetd-0.20221205/debian/patches/default_v4v6 openbsd-inetd-0.20221205/debian/patches/default_v4v6
--- openbsd-inetd-0.20221205/debian/patches/default_v4v6	2023-01-02 02:30:41.000000000 +0100
+++ openbsd-inetd-0.20221205/debian/patches/default_v4v6	2023-08-23 02:45:43.000000000 +0200
@@ -44,37 +44,35 @@
  	int val;
  	int argc;
 +	static int proto_override;
-+	static char *saved_cp;
++	static char saved_line[1024];
  
  	sep = calloc(1, sizeof(struct servtab));
  	if (sep == NULL) {
-@@ -1165,6 +1167,14 @@ getconfigent(void)
+@@ -1165,6 +1167,11 @@ getconfigent(void)
  more:
  	freeconfig(sep);
  
 +	if (proto_override) {
 +	    /* process again the same configuration entry */
-+	    cp = saved_cp;
-+	    saved_cp = NULL;
++	    cp = saved_line;
 +	} else {
-+		if (saved_cp)
-+		    free(saved_cp);
 +
  	while ((cp = nextline(fconfig)) && *cp == '#')
  		;
  	if (cp == NULL) {
-@@ -1172,6 +1182,10 @@ more:
+@@ -1172,6 +1179,11 @@ more:
  		return (NULL);
  	}
  
-+		/* keep a copy of the configuration entry */
-+		saved_cp = newstr(cp);
-+	} /* proto_override */
++	    /* keep a copy of the configuration entry */
++	    strcpy(saved_line, cp);
++
++	} /* !proto_override */
 +
  	memset(sep, 0, sizeof *sep);
  	arg = skip(&cp, 0);
  	if (arg == NULL) {
-@@ -1314,9 +1328,37 @@ do { \
+@@ -1314,9 +1326,37 @@ do { \
  	} else {
  		int s;
  
@@ -86,7 +84,7 @@
 +
 +			proto_override = 0;
 +			/* append "6" to se_proto */
- 			sep->se_family = AF_INET6;
++			sep->se_family = AF_INET6;
 +			l = strlen(sep->se_proto);
 +			s = malloc(l + 1 + 1);
 +			if (s == NULL) {
@@ -101,7 +99,7 @@
 +		} else if (sep->se_proto[strlen(sep->se_proto) - 1] == '4')
 +			sep->se_family = AF_INET;
 +		else if (sep->se_proto[strlen(sep->se_proto) - 1] == '6')
-+			sep->se_family = AF_INET6;
+ 			sep->se_family = AF_INET6;
 +		else {
 +			/*
 +			 * If no "4" or "6" was specified then process the
diff -Nru openbsd-inetd-0.20221205/debian/tests/everything openbsd-inetd-0.20221205/debian/tests/everything
--- openbsd-inetd-0.20221205/debian/tests/everything	2023-01-02 14:06:32.000000000 +0100
+++ openbsd-inetd-0.20221205/debian/tests/everything	2023-08-23 02:03:56.000000000 +0200
@@ -32,9 +32,10 @@
 print $fh $conf;
 close($fh);
 
+$SIG{CHLD} = 'IGNORE';
 my $pid = fork;
 if (not $pid) {
-	exec(qw(/usr/sbin/inetd -d -i ./inetd.conf));
+	exec(qw(/usr/sbin/inetd -d -i ./inetd.conf)) or
 	BAIL_OUT('exec failed');
 }
 
@@ -82,6 +83,30 @@
 like($_, qr/^client .+ ::1$/m);
 
 ##############################################################################
+open($fh, '>>', 'inetd.conf');
+$conf = << "END";
+2007	stream	tcp		nowait	$user	/usr/sbin/try-from
+END
+print $fh $conf;
+close($fh);
+
+my $i;
+$i = kill('HUP', $pid);
+ok($i, 'configuration reloaded');
+
+# what a second to allow inetd to exit if it has crashed
+usleep(1000000);
+
+$i = kill(0, $pid);
+ok($i, "the inetd process $pid still exists");
+BAIL_OUT('the inetd process has disappeared') if not $i;
+
+$_ = t(PeerPort => 2007);
+like($_, qr/^client .+ \Q127.0.0.1\E$/m);
+$_ = t(PeerPort => 2007, PeerHost => '::1');
+like($_, qr/^client .+ ::1$/m);
+
+##############################################################################
 kill('KILL', $pid);
 ok(1, 'inetd killed');
 
@@ -114,7 +139,7 @@
 			Type => SOCK_STREAM,
 			Timeout => 5,
 		) and return;
-		warn "IO::Socket::IP->new: $@";
+		warn "IO::Socket::IP->new: $@" unless $@ =~ /^Connection refused/;
 		usleep(100000);
 	}
 

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: openbsd-inetd
Source-Version: 0.20221205-2~deb12u1
Done: Marco d'Itri <md@linux.it>

We believe that the bug you reported is fixed in the latest version of
openbsd-inetd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1050542@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marco d'Itri <md@linux.it> (supplier of updated openbsd-inetd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 27 Aug 2023 02:14:24 +0200
Source: openbsd-inetd
Architecture: source
Version: 0.20221205-2~deb12u1
Distribution: bookworm
Urgency: medium
Maintainer: Marco d'Itri <md@linux.it>
Changed-By: Marco d'Itri <md@linux.it>
Closes: 1050542
Changes:
 openbsd-inetd (0.20221205-2~deb12u1) bookworm; urgency=medium
 .
   * Rebuilt for bookworm. (Closes: #1050542)
Checksums-Sha1:
 0d4d5d66f4a807c990c81d2387142b8d9e2f445f 1424 openbsd-inetd_0.20221205-2~deb12u1.dsc
 9e92555e59105b18556f09e3e1db958229187768 17604 openbsd-inetd_0.20221205-2~deb12u1.debian.tar.xz
 904112ff827fef844a2062169d48bf6eb4c22463 6230 openbsd-inetd_0.20221205-2~deb12u1_amd64.buildinfo
Checksums-Sha256:
 8cdca9f002e01f5cc39b0df4dd378942a286bd6e1e178376d21399381543c0ca 1424 openbsd-inetd_0.20221205-2~deb12u1.dsc
 8f5e7c48a76c03553076341de98d5fc43a3e51aae0a03033a5ad96fda1a503bd 17604 openbsd-inetd_0.20221205-2~deb12u1.debian.tar.xz
 5620181dc434c43a388b7632380d41fbaab77e9dc32a7f44ca8cbb90e1ff57ed 6230 openbsd-inetd_0.20221205-2~deb12u1_amd64.buildinfo
Files:
 b0a6019f2e4fc8e6c8639d97d2975fb1 1424 net optional openbsd-inetd_0.20221205-2~deb12u1.dsc
 e49da465b52d25043a75c77a60ed4e6c 17604 net optional openbsd-inetd_0.20221205-2~deb12u1.debian.tar.xz
 2c3cc17fa382dcb815073f95df4f5c37 6230 net optional openbsd-inetd_0.20221205-2~deb12u1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQQnKUXNg20437dCfobLPsM64d7XgQUCZOqXOQAKCRDLPsM64d7X
gQXqAQD/OWPBFBikJ8P346Ovmr/lj0ILSBEumgj6jBgxh3HqxwD/aBhkQaMRNTdG
mOxFNhIXm6M8b16FWcdINK5rl2kfugU=
=n6f3
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: