security: clear RAOP password from memory before freeing

Information Disclosure: Medium

The RAOP authentication password was freed without first clearing the
memory contents. This leaves the plaintext password in freed heap
memory where it could be recovered by an attacker with access to
process memory (e.g. via /proc/pid/mem, core dumps, or a separate
memory safety vulnerability).

Use explicit_bzero() to securely clear the password before freeing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Wim Taymans 2026-04-23 16:45:21 +02:00
parent e75f72476b
commit 6798f591bd

View file

@ -1671,7 +1671,10 @@ static void impl_destroy(struct impl *impl)
pw_properties_free(impl->headers); pw_properties_free(impl->headers);
pw_properties_free(impl->stream_props); pw_properties_free(impl->stream_props);
pw_properties_free(impl->props); pw_properties_free(impl->props);
free(impl->password); if (impl->password) {
explicit_bzero(impl->password, strlen(impl->password));
free(impl->password);
}
free(impl); free(impl);
} }