Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911812 - net-dialup/rp-l2tp-0.4-r4 SIGSEGV at start, stack overflow in built-in MD5 code
Summary: net-dialup/rp-l2tp-0.4-r4 SIGSEGV at start, stack overflow in built-in MD5 code
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-06 11:14 UTC by Gert Doering
Modified: 2023-08-09 04:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)