diff options
| author | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-07-07 01:13:29 +0300 |
|---|---|---|
| committer | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-07-07 01:15:06 +0300 |
| commit | e12b38501be622c9c8e030de86a28721d797e542 (patch) | |
| tree | fc8abfb28edc5672d6ef3c80ada558d6722a699a /drivers | |
| parent | 7a7ab323158a63f222698f85179090e3b6030b96 (diff) | |
| download | accel-ppp-e12b38501be622c9c8e030de86a28721d797e542.tar.gz accel-ppp-e12b38501be622c9c8e030de86a28721d797e542.zip | |
ipoe: fix username string leak on early session teardown
The ipoe-level ses->username always holds an allocated string
(_strdup of ifname/calling-station-id, u_inet_ntoa buffer or lua
result), but ipoe_session_free() never released it. Ownership is
normally transferred in auth_result() via ap_session_set_username(),
so the string was leaked whenever a session died before auth_result()
ran: termination while starting, PWDB_WAIT never completing, or
ipoe_create_interface() failure.
The create-interface failure path also leaked the freshly allocated
local copy outright, since it returned before the string was stored
anywhere.
Store the string in ses->username as soon as it is obtained and free
it in ipoe_session_free(). auth_result() clears ses->username before
handing ownership to ap_session_set_username(), so no double free is
possible.
Reported-by: Louis Scalbert (#101)
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions
