Bug#692129: Preliminar patch, test needed
¡Hola René! I've just uploaded the fixes to the 3 day delayed queue. Feel free to do your own upload if you prefer. I'm attaching a debdiff with the changes. Happy hacking, -- “There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." -- C.A.R. Hoare Saludos /\/\ /\ >< `/ diff -u pptpd-1.3.4/pptpctrl.c pptpd-1.3.4/pptpctrl.c --- pptpd-1.3.4/pptpctrl.c +++ pptpd-1.3.4/pptpctrl.c @@ -660,6 +660,7 @@ char *pppd_argv[16]; int an = 0; sigset_t sigs; + char pppInterfaceIPs[33]; pppd_argv[an++] = ppp_binary; @@ -760,7 +761,6 @@ } if (*pppaddrs[0] || *pppaddrs[1]) { - char pppInterfaceIPs[33]; sprintf(pppInterfaceIPs, "%s:%s", pppaddrs[0], pppaddrs[1]); pppd_argv[an++] = pppInterfaceIPs; } diff -u pptpd-1.3.4/pptpgre.c pptpd-1.3.4/pptpgre.c --- pptpd-1.3.4/pptpgre.c +++ pptpd-1.3.4/pptpgre.c @@ -443,6 +443,7 @@ unsigned char buffer[PACKET_MAX + sizeof(struct pptp_gre_header)]; } u; unsigned header_len; + ssize_t status; #ifdef HAVE_WRITEV struct iovec iovec[2]; #endif @@ -495,10 +496,16 @@ iovec[1].iov_len = len; - return writev(fd, iovec, 2); + status = writev(fd, iovec, 2); #else /* copy payload into buffer */ memcpy(u.buffer + header_len, pack, len); /* record and increment sequence numbers */ /* write this baby out to the net */ - return write(fd, u.buffer, header_len + len); + status = write(fd, u.buffer, header_len + len); #endif + if ((status >= 0) || (errno != ENOBUFS)) { + return status; + } + // if ENOBUFS, do not close the connection + gre.seq_sent--; + return 0; } diff -u pptpd-1.3.4/debian/changelog pptpd-1.3.4/debian/changelog --- pptpd-1.3.4/debian/changelog +++ pptpd-1.3.4/debian/changelog @@ -1,3 +1,14 @@ +pptpd (1.3.4-5.2) unstable; urgency=low + + * Non-maintainer upload. + * Handle ENOBUFS gracefully. +Closes: #692129: pptpd: PPTP Connections Drop + * Programming error, reference to a stack variable used out of scope in +arguments to execvp call. +Closes: #693136: pptpd: Binary trash when launching ppp + + -- Maximiliano Curia Wed, 28 Nov 2012 16:21:01 +0100 + pptpd (1.3.4-5.1) unstable; urgency=low * Non-maintainer upload signature.asc Description: Digital signature
Bug#692129: Preliminar patch, test needed
Control: tags 692129 - help ¡Hola! El 2012-11-24 a las 19:12 +0100, Maximiliano Curia escribió: > I'll try to contact upstream and ask for their input. No reply so far. I've tested the problem using libfiu, fiu-utils and two virtual machines: ## Server /etc/init.d/pptpd stop fiu-run -x /etc/init.d/pptpd start ## Client pon pptp ping -f 192.168.0.1 # server ## Server fiu-ctrl -c 'enable_random name=posix/io/rw/writev,failinfo=105,probability=0.01' $pid_of_connection_pptpd With the patch the package is dropped, which ends as an extra dot in the client. Without the patch produces the log described in the bug, and the connection is dropped. Trying to test this patch I hit another bug, already reported in: #693136 I'll try to upload both fixes. -- "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." -- Dennis Ritchie Saludos /\/\ /\ >< `/ signature.asc Description: Digital signature
Bug#692129: Preliminar patch, test needed
Works good for me. Thank-you! On 12-11-27 03:48 AM, René Mayrhofer wrote: On 2012-11-24 19:12, Maximiliano Curia wrote: The bug seems to be recognized by upstream but there seems to be no work going on towards a fix. I've prepared a preliminar patch, but I can't test it right now, if you can reproduce it, please test the patch and let me now of the results. I'll try to contact upstream and ask for their input. If you want to test this packages you can use the packages published in: http://maxy.com.ar/debian Or you can use the attached patch and apply it to the pptpd package. Thanks for the patch! I would like to get this fixed, but will realistically be unable to test it myself due to "real life constrains"... If anybody can test it in a different setting to verify that it fixes the bugs and doesn't break other cases, I am happy to do an upload. best regards, Rene -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#692129: Preliminar patch, test needed
On 2012-11-24 19:12, Maximiliano Curia wrote: > The bug seems to be recognized by upstream but there seems to be no work going > on towards a fix. I've prepared a preliminar patch, but I can't test it right > now, if you can reproduce it, please test the patch and let me now of the > results. > > I'll try to contact upstream and ask for their input. > > If you want to test this packages you can use the packages published in: > http://maxy.com.ar/debian > > Or you can use the attached patch and apply it to the pptpd package. Thanks for the patch! I would like to get this fixed, but will realistically be unable to test it myself due to "real life constrains"... If anybody can test it in a different setting to verify that it fixes the bugs and doesn't break other cases, I am happy to do an upload. best regards, Rene -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#692129: Preliminar patch, test needed
tags 692129 + help patch upstream thanks Hi, The bug seems to be recognized by upstream but there seems to be no work going on towards a fix. I've prepared a preliminar patch, but I can't test it right now, if you can reproduce it, please test the patch and let me now of the results. I'll try to contact upstream and ask for their input. If you want to test this packages you can use the packages published in: http://maxy.com.ar/debian Or you can use the attached patch and apply it to the pptpd package. Thanks, -- "If a pickpocket meets a saint, he sees only his pockets." -- Kegley's Law Saludos /\/\ /\ >< `/ diff -ru pptpd-1.3.4/pptpgre.c pptpd-1.3.4.changed/pptpgre.c --- pptpd-1.3.4/pptpgre.c 2012-11-24 18:07:08.0 +0100 +++ pptpd-1.3.4.changed/pptpgre.c 2012-11-24 18:02:34.498283284 +0100 @@ -443,6 +443,7 @@ unsigned char buffer[PACKET_MAX + sizeof(struct pptp_gre_header)]; } u; unsigned header_len; + ssize_t status; #ifdef HAVE_WRITEV struct iovec iovec[2]; #endif @@ -493,12 +494,18 @@ iovec[0].iov_len = header_len; iovec[1].iov_base = pack; iovec[1].iov_len = len; - return writev(fd, iovec, 2); + status = writev(fd, iovec, 2); #else /* copy payload into buffer */ memcpy(u.buffer + header_len, pack, len); /* record and increment sequence numbers */ /* write this baby out to the net */ - return write(fd, u.buffer, header_len + len); + status = write(fd, u.buffer, header_len + len); #endif + if ((status >= 0) || (errno != ENOBUFS)) { + return status; + } + // if ENOBUFS, do not close the connection + gre.seq_sent--; + return 0; } signature.asc Description: Digital signature