Page MenuHomeVyOS Platform

accel-ppp-ng: LCP echo check uses uninitialized stats when the counter read fails
In progress, LowPublicBUG

Description

send_echo_request() in accel-pppd/ppp/ppp_lcp.c compares the packet counter of the session with the last one it saw when lcp-echo-timeout is set. It ignores the result of ap_session_read_stats(), which leaves the stats untouched when it fails (interface gone, or the VPP stats instance lost: failed to get interface statistics), so the comparison runs on stack content.

Reproduce (rolling 2026.11.22, VPP 25.10, PPPoE server on a VPP interface, lcp-echo-interval 5, lcp-echo-timeout 70, lcp-echo-failure 2): freeze VPP with kill -STOP for 150 s. The stats segment is lost after about 60 s, the peer cannot answer, but the session is still active after 150 s and there is no lcp: no echo reply.

Fix: use the counters only if the read returned 0 or -EAGAIN, otherwise treat the session as without traffic so the echo timeout works. With the change the same test ends the session with lcp: no echo reply.

GitHub issue: https://github.com/accel-ppp/accel-ppp-ng/issues/48
Pull request: https://github.com/accel-ppp/accel-ppp-ng/pull/50

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

rherold created this object in space S1 VyOS Public.
Viacheslav changed the task status from Open to In progress.Thu, Nov 26, 1:18 PM
Viacheslav assigned this task to rherold.
Viacheslav changed the subtype of this task from "Task" to "Bug".