This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/24775] Please add a secure way to clear and free memory
- From: "toiwoton at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 05 Jul 2019 19:59:36 +0000
- Subject: [Bug malloc/24775] Please add a secure way to clear and free memory
- Auto-submitted: auto-generated
- References: <bug-24775-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=24775
--- Comment #2 from Topi Miettinen <toiwoton at gmail dot com> ---
(In reply to Florian Weimer from comment #1)
> We already explicit_bzero followed by free. Why is this not enough?
The background is this PR for systemd:
https://github.com/systemd/systemd/pull/12959
We're using gcc cleanup extension a lot but and it would be nice to use that
for clearing memory before free()ing. It's of course possible to use
explicit_bzero and free, but combining them to one function would be nicer.
Besides systemd, I suppose other programs could use the function if it was
provided by glibc.
>
> cfree is already taken, it was used by some old libcs as an alias for free.
How about clear_and_free() or erase_and_free() then?
-Topi
--
You are receiving this mail because:
You are on the CC list for the bug.