segfault on pppd parameters dump when using plugin pppol2tp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ppp (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
There is a bug in pppol2tp plugin:
Jan 14 00:56:27 iorange pppd[20230]: Plugin pppol2tp.so loaded.
Jan 14 00:56:27 iorange pppd[20230]: pppd options in effect:
Jan 14 00:56:27 iorange pppd[20230]: debug debug#011#011# (from /etc/ppp/
Jan 14 00:56:27 iorange pppd[20230]: nodetach#011#011# (from command line)
Jan 14 00:56:27 iorange pppd[20230]: logfile /var/log/
Jan 14 00:56:27 iorange pppd[20230]: unit 0#011#011# (from /etc/ppp/
Jan 14 00:56:27 iorange pppd[20230]: dump#011#011# (from /etc/ppp/
Jan 14 00:56:27 iorange pppd[20230]: plugin pppol2tp.
Jan 14 00:56:27 iorange pppd[20230]: noauth#011#011# (from /etc/ppp/
Jan 14 00:56:27 iorange pppd[20230]: name shooorf#011#011# (from /etc/ppp/
Jan 14 00:56:27 iorange pppd[20230]: remotename l2tp#011#011# (from /etc/ppp/
Jan 14 00:56:27 iorange kernel: [266504.060596] pppd[20230]: segfault at 0 ip 0000000000424960 sp 00007fff609ac230 error 4 in pppd[400000+5a000]
Bug could be reproduced only when ppp option "dump" is active and pppol2tp is used.
Seg fault caused by function "print_option" in options.c
Stack trace
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/lib/x86_
/usr/sbin/
The reason of segfault is invalid parameter declaration in source code of pppol2tp plugin:
static char *pppol2tp_fd_str;
...
static option_t pppol2tp_options[] = {
{ "pppol2tp", o_special, &setdevname_
"FD for PPPoL2TP socket", OPT_DEVNAM | OPT_A2STRVAL ,
Parameter should be declared as OPT_STATIC as well.
Status changed to 'Confirmed' because the bug affects multiple users.