Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 911812

Summary: net-dialup/rp-l2tp-0.4-r4 SIGSEGV at start, stack overflow in built-in MD5 code
Product: Gentoo Linux Reporter: Gert Doering <gert>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: UNCONFIRMED ---    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gert Doering 2023-08-06 11:14:49 UTC
rp-l2tpd crashes with SIGSEGV as soon as a tunnel setup is attempted.  Building with system MD5 (from -lmd) instead of the built-in MD5 code makes things work.

Reproducible: Always

Steps to Reproduce:
1. start rp-l2tpd in debug, foreground mode
# /usr/sbin/rp-l2tpd -d 255 -f

2. establish tunnel (config, secret in /etc/rp-l2tp/rp-l2tpd.conf)
# /usr/sbin/rp-l2tpd-control "start-session 10.0.0.1"

3. see lptpd crash
# /usr/sbin/rp-l2tpd -d 255 -f
   0.000 l2tp_peer_find(10.0.0.1) examining peer 10.0.0.1/32
   0.000 l2tp_peer_find(10.0.0.1) found 10.0.0.1/32
   0.000 tunnel_new() -> 37129/0
   0.000 auth_gen_response(secret=MySecret) -> 8608e49b000000000000000000000000
Segmentation fault


Actual Results:  
l2tpd crash

Expected Results:  
establish tunnel to named LNS

rp-l2tp-0.4 brings its own "md5.c" - if you remove that from compilation, change auth.c + dgram.c to include <sys/types.h> + <md5.h>, and add -lmd to EXTRA_LIBS in Makefile it will connect fine.

(As a side note: as there is no dependency to "pppd", it will still not work as-installed, without adding N_HDLC and SYNCPPP to kernel + installing net-dialup/pppd but that is a different bug)