On Tue, 15 Mar 2016 14:17:08 +0000 Jonathan McDowell <nood...@earth.li> wrote: > On Thu, Mar 10, 2016 at 07:50:22PM +0000, Dave Reeve wrote: > > Running l2tpns causes an instance crash as follows: > > > > # l2tpns -v > > *** buffer overflow detected ***: l2tpns terminated > > (full trace removed as it doesn't help) > > > > The problem exists in the ring buffer logging code. Specially the vsprintf > > is called with a length of 4095 when the size of the buffer is > > MAX_LOG_LENGTH > > (defined as 512 in l2tpns.h). The result is that as soon as the program is > > executed it crashes as soon as a few log messages are printed. The > > following > > patch resolves the problem. > > > > I also have some more minor fixes, which resolve compiler warnings. I > > am happy to share these if you let me know where to send them! > > Upstream these days is at http://git.sameswireless.fr/l2tpns.git and I > note Fernando has been maintaining Debian packaging. As I haven't been > using l2tpns for some time I have emailed him asking if he would like to > take over maintenance of the package in Debian. It's probably best to > send fixes directly upstream.
Last time I looked at Fernando's work he had implemented quite nice functionalities. However, as long as no one attempts an update to his version, Debian users are stuck with... no l2tpns package in testing[1]. As a first step, the patch that Dave submitted is enough to fix l2tpns and make it usable on jessie at my ISP. It would be nice if it could be integrated. Regarding the patch, shouldn't the size passed to vsnprintf be just MAX_LOG_LENGTH, as vsnprintf accounts for the trailing NUL byte? [1] https://packages.qa.debian.org/l/l2tpns/news/20160409T163908Z.html -- jca