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

Bug#768218: marked as done (netcfg segfaults when passed four or more nameservers)



Your message dated Thu, 06 Nov 2014 13:04:14 +0000
with message-id <E1XmMjW-0001vo-GT@franck.debian.org>
and subject line Bug#768218: fixed in netcfg 1.123
has caused the Debian Bug report #768218,
regarding netcfg segfaults when passed four or more nameservers
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.)


-- 
768218: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768218
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: netcfg
Version: 1.108+deb7u2
Tags: patch

When passed more than three nameservers, netcfg can segfaults in nm_write_static_ipvX due to a missing array bounds check. The attached patch (against current git master) should fix the issue.

Cheers
From f729be186bf9b99c3ee7b0f05543f18d79737cfc Mon Sep 17 00:00:00 2001
From: Kjell Braden <afflux@pentabarf.de>
Date: Thu, 6 Nov 2014 02:05:28 +0100
Subject: [PATCH] fix missing bounds check on nameserver array iteration

---
 nm-conf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nm-conf.c b/nm-conf.c
index 09b2fb4..db42c2c 100644
--- a/nm-conf.c
+++ b/nm-conf.c
@@ -88,7 +88,8 @@ void nm_write_static_ipvX(FILE *config_file, nm_ipvX ipvx)
     /* Get DNS in printable format. */
     memset(buffer, 0, NM_MAX_LEN_BUF);
 
-    for (i = 0; !empty_str(ipvx.nameservers[i]); i++) {
+    for (i = 0; (i < NETCFG_NAMESERVERS_MAX) &&
+               (!empty_str(ipvx.nameservers[i])); i++) {
         strcat(buffer, ipvx.nameservers[i]);
         strcat(buffer, ";");
     }
-- 
1.7.10.4

--- End Message ---
--- Begin Message ---
Source: netcfg
Source-Version: 1.123

We believe that the bug you reported is fixed in the latest version of
netcfg, 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 768218@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Cyril Brulebois <kibi@debian.org> (supplier of updated netcfg 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: SHA1

Format: 1.8
Date: Thu, 06 Nov 2014 13:49:31 +0100
Source: netcfg
Binary: netcfg netcfg-static
Architecture: source
Version: 1.123
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Cyril Brulebois <kibi@debian.org>
Description:
 netcfg     - Configure the network (udeb)
 netcfg-static - Configure a static network (udeb)
Closes: 768218
Changes:
 netcfg (1.123) unstable; urgency=medium
 .
   * Fix missing bounds check on nameserver array iteration, leading to a
     crash when 4 (or more) nameservers are available (Closes: #768218).
     Thanks, Kjell Braden, for the bug report, patch, and tests!
Checksums-Sha1:
 56492bf40d47db669c32edb1eff2601daff3e14c 1873 netcfg_1.123.dsc
 b69a88f63f00236ccba0f1d48e9eaa303ad1079a 392496 netcfg_1.123.tar.xz
Checksums-Sha256:
 2791e8566e3b9bedea39e0424e2a81dd4bddd28370bd3af2077ec90163f2f19d 1873 netcfg_1.123.dsc
 ca5336a81a0fd7e92efe5031e0b9ef36b676619347a1a800fcdfcbea40494d2c 392496 netcfg_1.123.tar.xz
Files:
 603d45708fa32ca033f5d95a48bb5f57 1873 debian-installer optional netcfg_1.123.dsc
 30b34761bc7b046be0169d496c2b224c 392496 debian-installer optional netcfg_1.123.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUW27NAAoJEP+RSvDCs1UgwSgQAJOdA95+hZKmcAZmwffz+n8a
zeMkcAeRzVfHjutghpTeq+f3HdO/RQSzVq1LNsA66YrrwkCbmhvON03UtI91zW1z
ZxqrW47HKb32rfoXSNtEzSPP7RpOAPTBLsXevEuMyiNA2KmDuDHnoxDFiYmyOwUF
rXnVNa5kJPm/3V+NMgXnIOpqpNXqr0a9dQUhoGaOocOMKetF7CBo6v3lcbmjnjmy
5a43cLCXS6cdjUEdDRxNAUEBpwL31XlijvKWVYTsu75ayVYyP1L/KJTsJ5A7EKeY
0uoOK+5VVc5Td9EBJsQbrL/4CU8dzSLWhQjIO1sbVmXn3e7FRIReDByl0cd/Uuof
OVG+atrfhyTbUPEB+ESyWifmrGGnLHaq7zPyN5adFxlWherQXRRoVuxDW7gyTb+h
jXkUui8gob59AHIzBz/fDHDbNftEe9+7Mo26X6rcYr5iPmwpyGJ6Be6rz9OeH4Hg
H8qTrRco9j2/QYwfDhNRbrSVEYOIiy68YgQyOxIMFNM4jkj1k26QW3wTzsa7Nqmt
vRrsDVhL6M5LEbUPa8icZ7r0OI6afvR4aZ6p/q2sjhyxoabktkXT29dRzPTDF93M
cPZ926M9hnUfQlhLIksVdJihzgy9qRScjNDVKy0UsfEdyvAAXNkG6ZhVzv2tmBCe
GPikHQzFyhRd4wbVMpMF
=9IZa
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: