Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pppd crash #454

Closed
jkroonza opened this issue Oct 13, 2023 · 0 comments · Fixed by #455
Closed

pppd crash #454

jkroonza opened this issue Oct 13, 2023 · 0 comments · Fixed by #455

Comments

@jkroonza
Copy link
Contributor

Hi,

Core was generated by `/usr/sbin/pppd local file /etc/ppp/options.pptpd 115200 ipparam 154.73.32.4 rem'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  vslprintf (buf=0x7ffeaba73f21 "D\247\253\376\177", buflen=494, fmt=<optimized out>, args=args@entry=0x7ffeaba73e30) at utils.c:382
382	utils.c: No such file or directory.
(gdb) bt
#0  vslprintf (buf=0x7ffeaba73f21 "D\247\253\376\177", buflen=494, fmt=<optimized out>, args=args@entry=0x7ffeaba73e30) at utils.c:382
#1  0x000055b9a82749b7 in slprintf (buf=buf@entry=0x7ffeaba73f10 "/var/run/radattr.D\247\253\376\177", buflen=buflen@entry=512, fmt=fmt@entry=0x7f3b59d80000 "/var/run/radattr.%s") at utils.c:129
#2  0x00007f3b59d7f21f in cleanup (opaque=<optimized out>, arg=<optimized out>) at radattr.c:117
#3  0x000055b9a826d15f in notify (notif=0x0, val=127) at main.c:2145
#4  0x000055b9a826d1cc in die (status=status@entry=127) at main.c:1286
#5  0x000055b9a826d247 in bad_signal (sig=11) at main.c:1657
#6  <signal handler called>
#7  vslprintf (buf=0x7ffeaba748c1 "", buflen=494, fmt=<optimized out>, args=args@entry=0x7ffeaba747d0) at utils.c:382
#8  0x000055b9a82749b7 in slprintf (buf=buf@entry=0x7ffeaba748b0 "/var/run/radattr.", buflen=buflen@entry=512, fmt=fmt@entry=0x7f3b59d80000 "/var/run/radattr.%s") at utils.c:129
#9  0x00007f3b59d7f21f in cleanup (opaque=<optimized out>, arg=<optimized out>) at radattr.c:117
#10 0x000055b9a826d15f in notify (notif=0x0, val=16) at main.c:2145
#11 0x000055b9a826d1cc in die (status=16) at main.c:1286
#12 0x000055b9a8256d38 in main (argc=<optimized out>, argv=<optimized out>) at main.c:660

From frame 2 where I believe the actual problem comes from:

117     slprintf(fname, sizeof(fname), "/var/run/radattr.%s", ppp_get_ifname(NULL,0));

So ppp_get_ifname is probably cleaned up prior to radattr cleaning up and thus resulting in a crash. Although right now it feels like this is happening at startup.

jkroonza added a commit to jkroonza/ppp that referenced this issue Oct 14, 2023
Closes: ppp-project#454
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
paulusmack pushed a commit that referenced this issue Oct 26, 2023
ppp_get_ifname() is the wrong thing to use in this slprintf call as
it returns an int which is the length of the interface name, not
a pointer to the interface name, which is what ppp_ifname()
returns.

Closes: #454

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants