Skip to content

plugins/radius: Free realm server strings on parse errors - #669

Open
grey3228 wants to merge 1 commit into
ppp-project:masterfrom
grey3228:fix/radrealms-string-leak
Open

grey3228 wants to merge 1 commit into
ppp-project:masterfrom
grey3228:fix/radrealms-string-leak

Conversation

@grey3228

Copy link
Copy Markdown
Contributor

lookup_realm() stores strdup() strings for matched realm servers. If parsing later fails, existing cleanup frees the SERVER containers but not the server names, including a partially added entry before its completion.

Add a helper to release all strings in a SERVER list and use it on parse-error paths. Normal ownership transfer is unchanged.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

lookup_realm() stores strdup() strings for matched realm servers. If
parsing later fails, existing cleanup frees the SERVER containers but
not the server names, including a partially added entry before its
completion.

Add a helper to release all strings in a SERVER list and use it on
parse-error paths. Normal ownership transfer is unchanged.

Found by Linux Verification Center (linuxtesting.org) with SVACE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant