After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 615711 - When deleting SoupCookieJarSqlite cookies, cookie content is still stored on disk
When deleting SoupCookieJarSqlite cookies, cookie content is still stored on ...
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
2.30.x
Other All
: Normal major
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2010-04-14 06:52 UTC by Lukasz Slachciak
Modified: 2010-04-26 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
turning on PRAGMA secure_delete in SoupCookieJarSqlite, (1.08 KB, patch)
2010-04-14 06:53 UTC, Lukasz Slachciak
committed Details | Review

Description Lukasz Slachciak 2010-04-14 06:52:27 UTC
In default SQLite compilations, for performance reasons SQLite is not deleting database content when delete is requested, but is just marking some part of table content as deleted.

In case of SoupCookieJarSqlite cookies stored in SQLite database such behavior can be major security issue.  Even if libsoup user decides to delete cookies, their content still stays on disk in readable form. Fortunately in 3.6.23 version of SQLite new PRAGMA statement was introduced allowing to change default behavior of database.
When PRAGMA secure_delete set on, SQLite overwrites deleted content with zeros.

Attached patch turns secure_delete on in SoupCookieJarSqlite cookie database.

see also
http://www.sqlite.org/changes.html#version_3_6_23
http://www.sqlite.org/pragma.html#pragma_secure_delete
Comment 1 Lukasz Slachciak 2010-04-14 06:53:39 UTC
Created attachment 158678 [details] [review]
turning on PRAGMA secure_delete in SoupCookieJarSqlite,
Comment 2 Dan Winship 2010-04-17 13:56:44 UTC
kov/xan, any thoughts on this? "There is a small performance penalty for this since additional I/O must occur." but I think overwriting old cookies with new values is more common than deleting cookies anyway
Comment 3 Xan Lopez 2010-04-19 13:00:29 UTC
(In reply to comment #2)
> kov/xan, any thoughts on this? "There is a small performance penalty for this
> since additional I/O must occur." but I think overwriting old cookies with new
> values is more common than deleting cookies anyway

I don't think deleting cookies is very common, as you say, so I don't care too much either way.
Comment 4 Gustavo Noronha (kov) 2010-04-26 12:08:37 UTC
+1 from me, if this shows up in profiling runs we can revisit, but I doubt it will =)
Comment 5 Dan Winship 2010-04-26 20:18:01 UTC
committed, and will go into 2.30.1