New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 637822 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Privacy: Cookies configured to be cleared are not cleared on system shutdown, only on Chrome quit.

Reported by xpis...@gmail.com, Aug 15 2016

Issue description

Chrome Version       :  52.0.2743.116 m (на любой версии)
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: not tested
    Firefox: ok
         IE: ok

What steps will reproduce the problem?

Здравствуйте, я не программист, но хотел бы указать на ошибку в безопасности личных данных в браузере Chrome.
В данный момент у меня установлена версия Chrome 52.0.2743.82 m, Windows 10 Версия 1607, Сборка ОС 14393.10.
Но ошибка безопасности проявлялась всегда на всех версиях Chrome и под Windows7.

Баг (ошибка) заключается в следующем: 
В настройках браузера у меня установлены некоторые сайты, у которых необходимо удалять Куки при выходе из браузера (gmail.com, facebook.com и т.д.). Всё исправно работает - при закрытии Chrome и повторном открытии Chrome на всех сайтах, указанных в настройках, необходимо заново логиниться и проблем с безопасностью нет. НО!!! Если при открытом браузере выключить компьютер или перегрузить, то при повторной загрузке - будь то сразу или через несколько дней, при открытии браузера (у меня стоит настройка отображать открытые вкладки) ВСЕ АККАУYТЫ, в которые был выполнен вход перед перезагрузкой или выключением компьютера, ОСТАЮТСЯ ДОСТУПНЫ (т.е. залогинены) для любого человека, который после меня включил компьютер. 
Я бы не хотел, чтобы по причине сбоя электричества или забывчивости разлогиниться, кто-то заdладел моими данными.
С уважение, 
Павел Курза
xpishka@gmail.com

What is the expected result?

После перезагрузки компьютера (выключения) браузер должен выходить из учётных записей

What happens instead?

https://www.youtube.com/watch?v=N-XbU7cY6HI


Please provide any additional information below. Attach a screenshot if
possible.

 
3e1ac810-41d0-4755-882e-cc1c93b23334.gif
61.6 KB View Download
Using Google Translate, I think this report is complaining that users can (via Settings) configure which sites to delete cookies for when exiting Chrome, but Chrome session restore (when you turn off or reboot your computer) does not respect this and leaves web pages open and signed in.

Comment 2 by xpis...@gmail.com, Aug 15 2016

 pauljensen - exactly
Components: Internals>Network>Cookies

Comment 4 by mmenke@chromium.org, Aug 18 2016

Cc: jww@chromium.org mkwst@chromium.org mmenke@chromium.org
Components: UI>Browser>Sessions Privacy
Summary: Privacy: Cookies configured to be cleared are not cleared on system shutdown, only on Chrome quit. (was: security bug)
Note that this would be considered a privacy issue, not a security bug.  If someone can log into your local system and use chrome, they can do all sorts of things, like install extensions that secretly safe cookies, or just change the option to clear cookies.

If Chrome doesn't exist cleanly, it can't delete cookies (Since it's no longer running).  If this is a clean system shutdown, though, seems like we should be deleting them.  Not sure who owns this code, currently.
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 21 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Archived)
Still available.

As discussed above, Chrome can't delete cookies if it doesn't exit cleanly, however, there are still some mitigations to explore such as finishing the cleanup on startup.
Labels: Hotlist-Privacy
Cc: dullweber@chromium.org
I looked into this issue and it seems like SessionOnly cookies are only deleted if the Browser is closed with Menu->Exit. 

The cookies aren't cleared on system shutdown but they are also not cleared if the last window of Chrome is closed.

DeleteSessionOnlyData() is called from different places each time. I created a document with stacktraces:
https://docs.google.com/a/google.com/document/d/1vfre7kA6gpQjfosWy3W0SV71psPs8Qt5pgkDxZBgpeg/edit?usp=sharing

Comment 9 by mmenke@chromium.org, Aug 29 2017

Cc: -jww@chromium.org sa...@chromium.org sky@chromium.org
Components: -Internals>Network>Cookies
Sounds like this is a sessions issue, rather than something cookie-specific.

Curiously, that IsTryingToQuit check has been around since that class was added, back in https://codereview.chromium.org/25414005/, with no questions or comments about the shutting down check.

[+sammc]:  Don't suppose you can remember the reason for the IsTryingToQuit check?
I removed the IsTryingToDelete check and it looks like everything is working fine when I close Chrome in various ways. 
 
The only issue seems to be that DeleteSessionOnlyData() would be executed twice if Chrome is closed via Menu->Exit.

https://chromium-review.googlesource.com/c/chromium/src/+/641458
After playing with different kinds of cookies and closing Chrome in different ways it seems like closing Chrome works fine but it is confusing:

1. Create SESSION_ONLY content setting for some domain
2. Create a cookie with expiration date

Menu>Exit -> SessionDataDeleter::Run is called and deletes cookies

Close Window -> SessionDataDeleter::Run is not called but cookies still disappear because
                QuotaPolicyCookieStore::~QuotaPolicyCookieStore does another round of cleanup

That means closing Chrome work correctly but I don't understand why SessionDataDeleter runs only in one of these cases.

Then there is another case: 
Chrome can be restarted without deleting sessions using e.g. chrome://restart, which calls UserSessionManager::AttemptRestart 
This disables QuotaPolicyCookieStore cleanup using QuotaPolicyCookieStore::SetForceKeepSessionState and relies on SessionDataDeleter being disabled through IsTryingToQuit, so we can't just remove this flag.

I'm still not sure what is happening on shutdown or logout and will try to investigate this more.
Issue 827820 has been merged into this issue.
Owner: dullweber@chromium.org
Status: Assigned (was: Available)

Sign in to add a comment