<feed xmlns='http://www.w3.org/2005/Atom'>
<title>accel-ppp.git/accel-pppd/ppp/ppp.c, branch sstp-alloc-invariant</title>
<subtitle>High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux (mirror of https://github.com/accel-ppp/accel-ppp.git)
</subtitle>
<id>https://git.amelek.net/accel-ppp/accel-ppp.git/atom?h=sstp-alloc-invariant</id>
<link rel='self' href='https://git.amelek.net/accel-ppp/accel-ppp.git/atom?h=sstp-alloc-invariant'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/'/>
<updated>2026-07-08T10:21:14+00:00</updated>
<entry>
<title>ppp: close unit fd only after session cleanup finishes</title>
<updated>2026-07-08T10:21:14+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-06T16:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=1d67a133e31cfe0c6cff01a3417c1e7eb4eb6e38'/>
<id>urn:sha1:1d67a133e31cfe0c6cff01a3417c1e7eb4eb6e38</id>
<content type='text'>
destablish_ppp() closed the ppp unit fd (via
triton_md_unregister_handler(..., 1)) before calling
ap_session_finished(). Closing the fd releases the ppp unit index, so
the kernel can assign the same unit (and thus the same pppX ifname) to
a new session while the old session's cleanup is still running.

pppd_compat performs its cleanup from the EV_SES_FINISHED handler: it
runs the ip-down script (blocking the context until the script exits)
and then deletes radattr.pppX. If the unit index is reused in that
window, the ip-down script is executed with an IFNAME that now belongs
to a different, active session, and remove_radattr() deletes the
radattr file of that new session. External accounting/shaper scripts
that read radattr.pppX then fail for a live session.

Fix this by unregistering the unit fd handler without closing the fd
and closing it only after ap_session_finished() returns, unless the fd
was handed to the unit cache. This keeps the unit index reserved until
session cleanup has finished, so the ifname cannot be reused early.

The unit-cache path is not affected (the cached fd already keeps the
unit reserved); the race only hits configurations with unit-cache
disabled. Only PPP sessions (PPPoE/PPTP/L2TP/SSTP) go through this
path; IPoE is unaffected. Note the unit index is now held slightly
longer during teardown (while ip-down runs) - this is intentional.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>ppp: Defend from possible ppp init failure</title>
<updated>2026-02-06T15:34:54+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-01-25T22:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=7ad4f3974448ddd890664e95b2a17feff3b4f7d3'/>
<id>urn:sha1:7ad4f3974448ddd890664e95b2a17feff3b4f7d3</id>
<content type='text'>
ppp init might fail due malloc failure, missing or invalid runtime state, failure to setup
resources (sockers, timers, handler registration), etc.
This is quite unlikely now, but some floating(hard to catch) bugs says
better to be safe than sorry.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>fix(ppp): Uninitialized struct fields</title>
<updated>2026-02-06T15:34:54+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-01-25T21:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=7cf817907283cf3a6495c6c5a028f5f6651e4f4b'/>
<id>urn:sha1:7cf817907283cf3a6495c6c5a028f5f6651e4f4b</id>
<content type='text'>
Initialized the ifreq in destablish_ppp to avoid the uninitialized-struct
warning before use.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>ppp: classic TOCTOU, as uc_size not guarded by mutex</title>
<updated>2026-02-06T15:34:54+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-01-25T21:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=474eba540738838dbb9d21cc1eb705c6ef060b94'/>
<id>urn:sha1:474eba540738838dbb9d21cc1eb705c6ef060b94</id>
<content type='text'>
It was a micro-optimization to skip taking the mutex when uc_size was 0.
But because uc_size isnt atomic and wasnt read under the lock, it created a TOCTOU window.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>crypto: Removed internal tomcat crypto.</title>
<updated>2025-12-10T17:16:42+00:00</updated>
<author>
<name>Andrii Melnychenko</name>
<email>a.melnychenko@vyos.io</email>
</author>
<published>2025-09-29T16:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=c912d09018828745e3bcba268cd02a611e324d54'/>
<id>urn:sha1:c912d09018828745e3bcba268cd02a611e324d54</id>
<content type='text'>
Signed-off-by: Andrii Melnychenko &lt;a.melnychenko@vyos.io&gt;
</content>
</entry>
<entry>
<title>ppp_chan_read: check unit_hnd avoiding proto rej</title>
<updated>2022-03-04T12:11:03+00:00</updated>
<author>
<name>Gabriel Jeanneau</name>
<email>gabriel.jeanneau@6wind.com</email>
</author>
<published>2022-01-13T10:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=57d5aa43123b8a8243e8e8e6971597afe352f9ed'/>
<id>urn:sha1:57d5aa43123b8a8243e8e8e6971597afe352f9ed</id>
<content type='text'>
When receiving IPCP packet on channel handler, check unit handler to
avoid sending a LCP Protocol Reject because ppp unit has not been
created yet.
This patch allows accel-ppp to handle higher pressure (handle 300
connections per second).

Signed-off-by: Gabriel Jeanneau &lt;gabriel.jeanneau@6wind.com&gt;
</content>
</entry>
<entry>
<title>ppp: reset the ifindex when moving back to the default namespace</title>
<updated>2020-03-18T08:07:38+00:00</updated>
<author>
<name>Simon Chopin</name>
<email>s.chopin@alphalink.fr</email>
</author>
<published>2020-02-28T10:43:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=c4c85030efdba8a927bbca7f8b010a0152f823cb'/>
<id>urn:sha1:c4c85030efdba8a927bbca7f8b010a0152f823cb</id>
<content type='text'>
If you move an interface into a namespace where there is alreay an
interface with the same index, the moved interface will get a new index
assigned to it. We need to update our data structure accordingly.

Signed-off-by: Simon Chopin &lt;s.chopin@alphalink.fr&gt;
</content>
</entry>
<entry>
<title>ppp: fix mtu/mru negotiation in preallocate/unit-cache modes</title>
<updated>2018-01-31T18:02:15+00:00</updated>
<author>
<name>Vladislav Grishenko</name>
<email>themiron@mail.ru</email>
</author>
<published>2018-01-31T17:59:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=4bcb9b082607fa3a1d0c9c377df9a1fe7b48f2b0'/>
<id>urn:sha1:4bcb9b082607fa3a1d0c9c377df9a1fe7b48f2b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ppp: fixed bug in ppp_terminate</title>
<updated>2018-01-24T07:25:33+00:00</updated>
<author>
<name>Dmitry Kozlov</name>
<email>xeb@mail.ru</email>
</author>
<published>2018-01-24T07:25:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=8b265c99a14ad6c7f3eeb59a8cff56870eb5f592'/>
<id>urn:sha1:8b265c99a14ad6c7f3eeb59a8cff56870eb5f592</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ppp: code simplification</title>
<updated>2016-07-14T17:49:00+00:00</updated>
<author>
<name>Dmitry Kozlov</name>
<email>xeb@mail.ru</email>
</author>
<published>2016-07-14T17:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=1dce3168c8a43ba1ef6d2b78355933aafc35d3f9'/>
<id>urn:sha1:1dce3168c8a43ba1ef6d2b78355933aafc35d3f9</id>
<content type='text'>
</content>
</entry>
</feed>
