SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
30.35k stars 3.17k forks source link

LibHTTP: Loading google analytics over HTTPS crashes with m_state == State::InBody assertion failure #3691

Closed Lubrsi closed 6 months ago

Lubrsi commented 3 years ago

Loading https://google-analytics.com/analytics.js crashes with this:

USERSPACE(117) ASSERTION FAILED: m_state == State::InBody
../Libraries/LibHTTP/Job.cpp:172
[ProtocolServer(117:117)]: Terminating ProtocolServer(117) due to signal 6
[FinalizerTask(3:3)]: CPU[0] NP(error) fault at invalid address V0x01c0260c
[FinalizerTask(3:3)]: copy_from_user(0xc094a9ac, 0x01c0260c, 4) failed at V0x01c0260c
[FinalizerTask(3:3)]: 0xdeadc0de  Kernel::Processor::switch_context(Kernel::Thread*&, Kernel::Thread*&) +181
0xdeadc0de  Kernel::Scheduler::context_switch(Kernel::Thread*) +181
0xdeadc0de  Kernel::Scheduler::pick_next() +1952
0xdeadc0de  Kernel::Processor::check_invoke_scheduler() +125
0xdeadc0de  Kernel::Thread::die_if_needed() +157
0xdeadc0de  syscall_handler +1414
0xdeadc0de  syscall_asm_entry +49
0x0807af7b  raise +22
0x080480bd  abort +13
0x08077de1  __cxa_atexit +0
0x0805f19f  AK::Function<void ()>::CallableWrapper<HTTP::Job::on_socket_connected()::{lambda()#2}>::call() const +1295
0x0805fe27  TLS::TLSv12::read_from_socket() +99
0x08050599  Core::EventLoop::pump(Core::EventLoop::WaitMode) +265
0x08050743  Core::EventLoop::exec() +43
0x080485af  main +384
0x08048a1e  _start +94

It loads fine over regular HTTP.

alimpfard commented 3 years ago

Been a while since I've seen a LibHTTP bug Exciting!

alimpfard commented 3 years ago

Hmmm...I can't reproduce this, pro https://google-analytics.com/analytics.js -O succeeds and produces an ok-looking file. opening it in the browser seems to be fine too, it loads and then "Failed to parse content".

that host resolves to 172.217.16.164 for me, not sure if that's significant. the request produced via pro is:

GET /analytics.js HTTP/1.1
Host: google-analytics.com
Connection: close
Lubrsi commented 3 years ago

Here's a log with JOB_DEBUG enabled:

LookupServer(26): Got request for 'google-analytics.com' (using IP 1.1.1.1)
[LookupServer(26:26)]: sending as udp packet from 10.0.2.15:36908 to 1.1.1.1:53!
Got response (ID: 24157)
  Question count: 1
  Answer count: 1
 Authority count: 0
Additional count: 0
LookupServer(26): Question #0: _gOogLe-ANaLytics.CoM._ type: 1, class: 1
LookupServer(26): Answer   #0: name=_gOogLe-ANaLytics.CoM._, type=1, ttl=263, length=4, data=_216.58.204.36_
started download with id 1
ProtocolServer(28): Job: raw_request:
ProtocolServer(28): GET /analytics.js HTTP/1.1
Host: google-analytics.com
Connection: close

ProtocolServer(28): Job: [Strict-Transport-Security] = 'max-age=10886400; includeSubDomains; preload'
ProtocolServer(28): Job: [Date] = 'Mon, 05 Oct 2020 17:46:26 GMT'
ProtocolServer(28): Job: [Expires] = 'Mon, 05 Oct 2020 19:46:26 GMT'
ProtocolServer(28): Job: [Last-Modified] = 'Wed, 09 Sep 2020 01:50:37 GMT'
ProtocolServer(28): Job: [X-Content-Type-Options] = 'nosniff'
ProtocolServer(28): Job: [Content-Type] = 'text/javascript'
ProtocolServer(28): Job: [Vary] = 'Accept-Encoding'
ProtocolServer(28): Job: [Server] = 'Golfe2'
ProtocolServer(28): Job: [Cache-Control] = 'public, max-age=7200'
ProtocolServer(28): Job: [Age] = '4043'
ProtocolServer(28): Job: [Alt-Svc] = 'h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"'
ProtocolServer(28): Job: [Accept-Ranges] = 'none'
ProtocolServer(28): Job: [Connection] = 'close'
ProtocolServer(28): Job: [Transfer-Encoding] = 'chunked'
ProtocolServer(28): Job: This content has transfer encoding 'chunked'
_rotocolServer(28): Job: Received a chunk with size _8000
ProtocolServer(28): Job: Chunk of size _32768_ started
ProtocolServer(28): Job: We have 7351 bytes left over in this chunk
ProtocolServer(28): Job: Resuming chunk with _7351_ bytes left over
ProtocolServer(28): Job: We have 3232 bytes left over in this chunk
ProtocolServer(28): Job: Resuming chunk with _3232_ bytes left over
ProtocolServer(28): Job: We have 1859 bytes left over in this chunk
ProtocolServer(28): Job: Resuming chunk with _1859_ bytes left over
ProtocolServer(28): Job: We have 0 bytes left over in this chunk
ProtocolServer(28): Job: Finished a chunk of 32768 bytes
_rotocolServer(28): Line following (should be empty): _
_rotocolServer(28): Job: Received a chunk with size _3599
ProtocolServer(28): Job: Chunk of size _13721_ started
ProtocolServer(28): Job: We have 10981 bytes left over in this chunk
ProtocolServer(28): Job: Resuming chunk with _10981_ bytes left over
ProtocolServer(28): Job: We have 6862 bytes left over in this chunk
ProtocolServer(28): Job: Resuming chunk with _6862_ bytes left over
ProtocolServer(28): Job: We have 4116 bytes left over in this chunk
ProtocolServer(28): Job: Resuming chunk with _4116_ bytes left over
ProtocolServer(28): Job: We have 0 bytes left over in this chunk
ProtocolServer(28): Job: Finished a chunk of 13721 bytes
_rotocolServer(28): Line following (should be empty): _
ProtocolServer(28): Job: Received a chunk with size __
ProtocolServer(28): Job: Reached end of stream
USERSPACE(28) ASSERTION FAILED: m_state == State::InBody
../Libraries/LibHTTP/Job.cpp:172
[ProtocolServer(28:28)]: Terminating ProtocolServer(28) due to signal 6
[FinalizerTask(3:3)]: CPU[0] NP(error) fault at invalid address V0x0100260c
[FinalizerTask(3:3)]: copy_from_user(0xc094a9ac, 0x0100260c, 4) failed at V0x0100260c
[FinalizerTask(3:3)]: 0xdeadc0de  Kernel::Processor::switch_context(Kernel::Thread*&, Kernel::Thread*&) +181
0xdeadc0de  Kernel::Scheduler::context_switch(Kernel::Thread*) +181
0xdeadc0de  Kernel::Scheduler::pick_next() +1952
0xdeadc0de  Kernel::Processor::check_invoke_scheduler() +125
0xdeadc0de  Kernel::Thread::die_if_needed() +157
0xdeadc0de  syscall_handler +1414
0xdeadc0de  syscall_asm_entry +49
0x0807b491  raise +22
0x080480bd   +13
0x080782f7  __cxa_atexit +0
0x0805f3f6  HTTP::Job::on_socket_connected()::{lambda()#2}::operator()() const +1538
0x08060351  TLS::TLSv12::read_from_socket() +99
0x08050599  Core::EventLoop::pump(Core::EventLoop::WaitMode) +265
0x08050743  Core::EventLoop::exec() +43
0x080485af  main +384
0x08048a1e  _start +94

[NetworkTask(5:5)]: handle_tcp: unexpected flags in CloseWait state
Lubrsi commented 3 years ago

So, I turned TLS_DEBUG on and it started working. Prior to turning on the debug statements it didn't work, but now with JOB_DEBUG and TLS_DEBUG, it works inconsistently.

alimpfard commented 3 years ago

Hmm...we shouldn't really bother looking at the data past the end of the chunk stream...I wonder what it's sending there? I don't know if TLS_DEBUG prints the decrypted values, but could you give a log with TLS_DEBUG too?

tomuta commented 3 years ago

Hmm...we shouldn't really bother looking at the data past the end of the chunk stream...I wonder what it's sending there? I don't know if TLS_DEBUG prints the decrypted values, but could you give a log with TLS_DEBUG too?

Trailing headers follow the last chunk.

alimpfard commented 3 years ago

This "end of stream" is past the trailing headers, why else would there be an empty line in the middle of the trailing headers?

Lubrsi commented 3 years ago

https://gist.github.com/Lubrsi/ee78e58a2322e06e9eabd1e7fddbe332

With TLS_DEBUG on, it works without issue. I assume because of all the time spent printing the debug log before actually processing the end of the job.

tomuta commented 3 years ago

This "end of stream" is past the trailing headers, why else would there be an empty line in the middle of the trailing headers?

Oh I see. Yeah trailing headers should be terminated with an empty line and after that the next response status line should follow (or a disconnect).

alimpfard commented 3 years ago

What does the raw response over TLS look like? you can try putting the request in a file and test-crypto tls -s google-analytics.com -p 443 -f whatever.txt I can't think of any reason that it would insert an extra empty line in the middle of the stream

Lubrsi commented 3 years ago

With TLS_DEBUG and JOB_DEBUG enabled: https://gist.github.com/Lubrsi/80993f94700f0d02883d7a992b603b6c File: analytics.txt

With them disabled: File: analytics.txt

tomuta commented 3 years ago

With TLS_DEBUG and JOB_DEBUG enabled: https://gist.github.com/Lubrsi/80993f94700f0d02883d7a992b603b6c File: analytics.txt

With them disabled: File: analytics.txt

Looks pretty much the same

--- analytics.txt   2020-10-05 14:56:23.729332774 -0600
+++ analytics_disabled.txt  2020-10-05 14:56:34.577509188 -0600
@@ -7,7 +7,7 @@
 Content-Type: text/javascript
 Vary: Accept-Encoding
 Server: Golfe2
-Age: 2631
+Age: 3226
 Cache-Control: public, max-age=7200
 Alt-Svc: h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
 Accept-Ranges: none
Lubrsi commented 3 years ago

Heres pcaps for HTTPS (with the crash) and HTTP: https://drive.google.com/file/d/1gGN12xV0q_sA0ZNZH7UbGDOpnqNHweXb/view?usp=sharing

Honestly, the HTTPS looks fine at first glance, but it still hit the assertion.

bcoles commented 3 years ago

I ran into this assertion while attempting to develop a reproducer for #4604.

The test page was loaded over an unencrypted HTTP connection, not HTTPS.

Reproduce:

<p>We use various technologies to collect and store information, including <a class="g1mG8c" href="privacy#footnote-cookies" data-name="cookies" jsaction="click:IPbaae(preventDefault=true)">cookies</a>, <a class="g1mG8c" href="privacy#footnote-pixel" data-name="pixel" jsaction="click:IPbaae(preventDefault=true)">pixel tags</a>, local storage, such as <a class="g1mG8c" href="privacy#footnote-browser-storage" data-name="browser-storage" jsaction="click:IPbaae(preventDefault=true)">browser web storage</a> or <a class="g1mG8c" href="privacy#footnote-application-data-cache" data-name="application-data-cache" jsaction="click:IPbaae(preventDefault=true)">application data caches</a>, databases, and <a class="g1mG8c" href="privacy#footnote-server-logs" data-name="server-logs" jsaction="click:IPbaae(preventDefault=true)">server logs</a>.</p></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="whycollect" class="ahbJ5"></div><div class="pTrV6d"><div class="M3GAob"><div class="O3bgpc"><iframe src="https://www.youtube.com/embed/48l-xdS4pXg?rel=0&amp;showinfo=0&amp;theme=light&amp;version=3&amp;hl=en&amp;cc_lang_pref=en&amp;cc_load_policy=1&amp;enablejsapi=1" allowfullscreen="allowfullscreen" class="Ylcf5b"></iframe></div></div></div><h1>Why Google collects data</h1><p class="vxK8q">We use data to build better services</p><p>We use the information we collect from all our services for the following purposes:</p><h3>Provide our services</h3><div class="pjyxF "><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/b18d13e9ea8a362642b7d25bce665039.svg"/></div><p>We use your information to <a class="g1mG8c" href="privacy#footnote-deliver-services" data-name="deliver-services" jsaction="click:IPbaae(preventDefault=true)">deliver our services</a>, like processing the terms you search for in order to return results or helping you share content by suggesting recipients from your contacts.<h3>Maintain & improve our services</h3><div class="pjyxF "><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/4165cd3aa643abb80fe1953668f67551.svg"/></div><p>We also use your information to <a class="g1mG8c" href="privacy#footnote-ensure-working" data-name="ensure-working" jsaction="click:IPbaae(preventDefault=true)">ensure our services are working as intended</a>, such as tracking outages or troubleshooting issues that you report to us. And we use your information to <a class="g1mG8c" href="privacy#footnote-make-improvements" data-name="make-improvements" jsaction="click:IPbaae(preventDefault=true)">make improvements</a> to our services — for example, understanding which search terms are most frequently misspelled helps us improve spell-check features used across our services.<h3>Develop new services</h3><div class="pjyxF "><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/546f2b674b407304a2570e71a216e509.svg"/></div><p>We use the information we collect in existing services to help us develop new ones. For example, understanding how people organized their photos in Picasa, Google’s first photos app, helped us design and launch Google Photos.</p><h3>Provide personalized services, including content and ads</h3><div class="pjyxF "><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/51cd09d6239edc9652bc05ad1d149a5c.svg"/></div><p>We use the information we collect to customize our services for you, including providing recommendations, personalized content, and <a class="g1mG8c" href="privacy#footnote-customized-search" data-name="customized-search" jsaction="click:IPbaae(preventDefault=true)">customized search results</a>. For example, <a href="https://myaccount.google.com/security-checkup?utm_source=pp" class="N6CPUe" target="_blank">Security Checkup</a> provides security tips adapted to how you use Google products. And Google Play uses information like apps you’ve already installed and videos you’ve watched on YouTube to suggest new apps you might like.</p><p>Depending on your settings, we may also show you <a class="g1mG8c" href="privacy#footnote-personalized-ads" data-name="personalized-ads" jsaction="click:IPbaae(preventDefault=true)">personalized ads</a> based on your interests. For example, if you search for “mountain bikes,” you may see an ad for sports equipment when you’re browsing a site that shows ads served by Google. You can control what information we use to show you ads by visiting your ad settings.</p><ul><li>We don’t show you personalized ads based on <a class="g1mG8c" href="privacy#footnote-sensitive-categories" data-name="sensitive-categories" jsaction="click:IPbaae(preventDefault=true)">sensitive categories</a>, such as race, religion, sexual orientation, or health.</li><li>We don’t share information that personally identifies you with advertisers, such as your name or email, unless you ask us to. For example, if you see an ad for a nearby flower shop and select the “tap to call” button, we’ll connect your call and may share your phone number with the flower shop.</li></ul><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM " alt="" src="https://www.gstatic.com/policies/privacy/900a793eae04f4bddd675f8d95c4a794.svg"/></div><div class="gwGFXb"><p class="n8ZyWe"><a href="https://adssettings.google.com/?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-adssettings">Go to Ad Settings</a></p></div></div><h3>Measure performance</h3><div class="pjyxF "><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/a8e78fa7fa279aa946fe1a9d6a0508f2.svg"/></div><p>We use data for analytics and measurement to understand how our services are used. For example, we analyze data about your visits to our sites to do things like optimize product design. And we also use data about the ads you interact with to help advertisers understand the performance of their ad campaigns. We use a variety of tools to do this, including Google Analytics. When you visit sites that use Google Analytics, Google and a Google Analytics customer <a class="g1mG8c" href="privacy#footnote-link-info" data-name="link-info" jsaction="click:IPbaae(preventDefault=true)">may link information</a> about your activity from that site with activity from other sites that use our ad services.</p><h3>Communicate with you</h3><div class="pjyxF "><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/acad335ad7ba163209d8c3e671b2c445.svg"/></div><p>We use information we collect, like your email address, to interact with you directly. For example, we may send you a notification if we detect suspicious activity, like an attempt to sign in to your Google Account from an unusual location. Or we may let you know about upcoming changes or improvements to our services. And if you contact Google, we’ll keep a record of your request in order to help solve any issues you might be facing.</p><h3>Protect Google, our users, and the public</h3><div class="pjyxF "><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/02f8664b95445de6f27ba682f3c5f9ab.svg"/></div><p>We use information to help improve the <a class="g1mG8c" href="privacy#footnote-safety-reliability" data-name="safety-reliability" jsaction="click:IPbaae(preventDefault=true)">safety and reliability</a> of our services. This includes detecting, preventing, and responding to fraud, abuse, security risks, and technical issues that could harm Google, our users, or the public.</p><hr/><p>We use different technologies to process your information for these purposes. We use automated systems that analyze your content to provide you with things like customized search results, personalized ads, or other features tailored to how you use our services. And we analyze your content to help us <a class="g1mG8c" href="privacy#footnote-detect-abuse" data-name="detect-abuse" jsaction="click:IPbaae(preventDefault=true)">detect abuse</a> such as spam, malware, and illegal content. We also use <a class="g1mG8c" href="privacy#footnote-algorithm" data-name="algorithm" jsaction="click:IPbaae(preventDefault=true)">algorithms</a> to recognize patterns in data. For example, Google Translate helps people communicate across languages by detecting common language patterns in phrases you ask it to translate.</p><p>We may <a class="g1mG8c" href="privacy#footnote-combine-info" data-name="combine-info" jsaction="click:IPbaae(preventDefault=true)">combine the information we collect</a> among our services and across your devices for the purposes described above. For example, if you watch videos of guitar players on YouTube, you might see an ad for guitar lessons on a site that uses our ad products. Depending on your account settings, <a class="g1mG8c" href="privacy#footnote-other-sites" data-name="other-sites" jsaction="click:IPbaae(preventDefault=true)">your activity on other sites and apps</a> may be associated with your personal information in order to improve Google’s services and the ads delivered by Google.</p><p>If other users already have your email address or other information that identifies you, we may show them your publicly visible Google Account information, such as your name and photo. This helps people identify an email coming from you, for example.</p><p>We’ll ask for your consent before using your information for a purpose that isn’t covered in this Privacy Policy.</p></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="infochoices" class="ahbJ5"></div><div class="pTrV6d"><div class="M3GAob"><div class="O3bgpc">
<iframe src="https://www.youtube.com/embed/ZdEIZNg3epQ?rel=0&amp;showinfo=0&amp;theme=light&amp;version=3&amp;hl=en&amp;cc_lang_pref=en&amp;cc_load_policy=1&amp;enablejsapi=1" allowfullscreen="allowfullscreen" class="Ylcf5b"></iframe></div></div></div><h1>Your privacy controls</h1><p class="vxK8q">You have choices regarding the information we collect and how it's used</p><p>This section describes key controls for managing your privacy across our services. You can also visit the <a href="https://myaccount.google.com/privacycheckup?utm_source=pp&amp;utm_medium=Promo-in-product&amp;utm_campaign=pp_body" class="N6CPUe" target="_blank">Privacy Checkup</a>, which provides an opportunity to review and adjust important privacy settings. In addition to these tools, we also offer specific privacy settings in our products — you can learn more in our <a href="technologies/product-privacy">Product Privacy Guide</a>.</p><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM " alt="" src="https://www.gstatic.com/policies/privacy/2951277d4c35389d7d304ed78d4fb6f6.svg"/></div><div class="gwGFXb"><p class="n8ZyWe"><a href="https://myaccount.google.com/privacycheckup?utm_source=pp&amp;utm_medium=Promo-in-product&amp;utm_campaign=pp_body" class="ky8S2" data-track-as="pgc-pp-pcheckup">Go to Privacy Checkup</a></p></div></div><h2>Managing, reviewing, and updating your information</h2><p>When you’re signed in, you can always review and update information by visiting the services you use. For example, Photos and Drive are both designed to help you manage specific types of content you’ve saved with Google.</p><p>We also built a place for you to review and control information saved in your Google Account. Your <a href="https://myaccount.google.com/" class="N6CPUe" target="_blank">Google Account</a> includes:</p><h3>Privacy controls</h3><div class="h0yEnd WTetv adRtod"><div class="IN2z4b"><img class="mZPFM uTLSAb" alt="" src="https://www.gstatic.com/policies/privacy/3394102be0315326fd760e503b31c7b6.svg"/></div><div class="gwGFXb"><h3 class="SWFQ9e">Activity Controls</h3><p class="n8ZyWe">Decide what types of activity you’d like saved in your account. For example, you can turn on Location History if you want traffic predictions for your daily commute, or you can save your YouTube Watch History to get better video suggestions.</p><p class="n8ZyWe"><a href="https://myaccount.google.com/activitycontrols?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-activitycontrols">Go to Activity Controls</a></p></div></div><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM uTLSAb" alt="" src="https://www.gstatic.com/policies/privacy/900a793eae04f4bddd675f8d95c4a794.svg"/></div><div class="gwGFXb"><h3 class="SWFQ9e">Ad settings</h3><p class="n8ZyWe">Manage your preferences about the ads shown to you on Google and on sites and apps that <a class="g1mG8c" href="privacy#footnote-partner" data-name="partner" jsaction="click:IPbaae(preventDefault=true)">partner with Google</a> to show ads. You can modify your interests, choose whether your personal information is used to make ads more relevant to you, and turn on or off certain advertising services.</p><p class="n8ZyWe"><a href="https://adssettings.google.com/?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-adssettings">Go to Ad Settings</a></p></div></div><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM uTLSAb" alt="" src="https://www.gstatic.com/policies/privacy/c1b97d74dace7e43a9ccb26841a7cae4.svg"/></div><div class="gwGFXb"><h3 class="SWFQ9e">About you</h3><p class="n8ZyWe">Control what others see about you across Google services.</p><p class="n8ZyWe"><a href="https://myaccount.google.com/profile?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-aboutme">Go to About You</a></p></div></div><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM uTLSAb" alt="" src="https://www.gstatic.com/policies/privacy/e28714c71f217892f72b2698ea5cefef.svg"/></div><div class="gwGFXb"><h3 class="SWFQ9e">Shared endorsements</h3><p class="n8ZyWe">Choose whether your name and photo appear next to your activity, like reviews and recommendations, that appear in ads.</p><p class="n8ZyWe"><a href="https://myaccount.google.com/shared-endorsements?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-sharedendorsements">Go to Shared Endorsements</a></p></div></div><h3>Ways to review & update your information</h3><div class="h0yEnd WTetv adRtod"><div class="IN2z4b"><img class="mZPFM uTLSAb" alt="" src="https://www.gstatic.com/policies/privacy/5e7cd445f8861a262a3da876f855a4cc.svg"/></div><div class="gwGFXb"><h3 class="SWFQ9e">My Activity</h3><p class="n8ZyWe">My Activity allows you to review and control data that’s created when you use Google services, like searches you’ve done or your visits to Google Play. You can browse by date and by topic, and delete part or all of your activity.</p><p class="n8ZyWe"><a href="https://myactivity.google.com/myactivity?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-myactivity">Go to My Activity</a></p></div></div><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM uTLSAb" alt="" src="https://www.gstatic.com/policies/privacy/02698a3383765bd3c250471c53a86c5a.svg"/></div><div class="gwGFXb"><h3 class="SWFQ9e">Google Dashboard</h3><p class="n8ZyWe">Google Dashboard allows you to manage information associated with specific products.</p><p class="n8ZyWe"><a href="https://myaccount.google.com/dashboard?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-dashboard">Go to Dashboard</a></p></div></div><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM uTLSAb" alt="" src="https://www.gstatic.com/policies/privacy/4f19891c43001db11efc8048f9bc7cdb.svg"/></div><div class="gwGFXb"><h3 class="SWFQ9e">Your personal information</h3><p class="n8ZyWe">Manage your contact information, such as your name, email, and phone number.</p><p class="n8ZyWe"><a href="https://myaccount.google.com/personal-info?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-personalinfo">Go to Personal Info</a></p></div></div><p>When you’re signed out, you can manage information associated with your browser or device, including:</p><ul><li>Signed-out search personalization: <a href="https://www.google.com/history/optout?utm_source=pp" class="N6CPUe" target="_blank">Choose</a> whether your search activity is used to offer you more relevant results and recommendations.</li><li>YouTube settings: Pause and delete your <a href="https://www.youtube.com/feed/history/search_history?utm_source=pp" class="N6CPUe" target="_blank">YouTube Search History</a> and your <a href="https://www.youtube.com/feed/history?utm_source=pp" class="N6CPUe" target="_blank">YouTube Watch History</a>.</li><li>Ad Settings: <a href="https://adssettings.google.com/?utm_source=pp" class="N6CPUe" target="_blank">Manage</a> your preferences about the ads shown to you on Google and on sites and apps that partner with Google to show ads.</li></ul><h2>Exporting, removing & deleting your information</h2><p>You can export a copy of content in your Google Account if you want to back it up or use it with a service outside of Google.</p><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM " alt="" src="https://www.gstatic.com/policies/privacy/5959e84c2197c8a27da0a717f1cd47d5.svg"/></div><div class="gwGFXb"><p class="n8ZyWe"><a href="https://takeout.google.com/?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-takeout">Export your data</a></p></div></div><p>You can also <a href="https://support.google.com/legal?p=privpol_remove" class="N6CPUe" target="_blank">request to remove content</a> from specific Google services based on applicable law.</p><p>To delete your information, you can:</p><ul><li>Delete your content from <a class="g1mG8c" href="privacy#footnote-delete-specific" data-name="delete-specific" jsaction="click:IPbaae(preventDefault=true)">specific Google services</a></li><li>Search for and then delete specific items from your account using <a href="https://myactivity.google.com/?utm_source=pp" class="N6CPUe" target="_blank">My Activity</a></li><li><a href="https://myaccount.google.com/deleteservices?utm_source=pp" class="N6CPUe" target="_blank">Delete specific Google products</a>, including your information associated with those products</li><li><a href="https://myaccount.google.com/deleteaccount?utm_source=pp" class="N6CPUe" target="_blank">Delete your entire Google Account</a></li></ul><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM " alt="" src="https://www.gstatic.com/policies/privacy/1fa3e4ce8ac456f39ed02a6f9eb49b14.svg"/></div><div class="gwGFXb"><p class="n8ZyWe"><a href="https://myaccount.google.com/delete-services-or-account?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-delete">Delete your information</a></p></div></div><p>And finally, <a href="https://myaccount.google.com/inactive?utm_source=pp" class="N6CPUe" target="_blank">Inactive Account Manager</a> allows you to give someone else access to parts of your Google Account in case you’re unexpectedly unable to use your account.</p><hr/><p>There are other ways to control the information Google collects whether or not you’re signed in to a Google Account, including:</p><ul><li>Browser settings: For example, you can configure your browser to indicate when Google has set a <a class="g1mG8c" href="privacy#footnote-cookies" data-name="cookies" jsaction="click:IPbaae(preventDefault=true)">cookie</a> in your browser. You can also configure your browser to block all cookies from a specific domain or all domains. But remember that our services <a class="g1mG8c" href="privacy#footnote-rely-on-cookies" data-name="rely-on-cookies" jsaction="click:IPbaae(preventDefault=true)">rely on cookies to function properly</a>, for things like remembering your language preferences.</li><li>Device-level settings: Your device may have controls that determine what information we collect. For example, you can <a href="https://support.google.com/websearch?p=privpol_locserp" class="N6CPUe" target="_blank">modify location settings</a> on your Android device.</li></ul></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="infosharing" class="ahbJ5"></div><div class="pjyxF m2dIJf"><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/fa9e0e90d1e7ec399dad9f3257a9bb63.svg"/></div><h1>Sharing your information</h1><h2>When you share your information</h2><p>Many of our services let you share information with other people, and you have control over how you share. For example, you can share videos on YouTube publicly or you can decide to keep your videos private. Remember, when you share information publicly, your content may become accessible through search engines, including Google Search.</p><p>When you’re signed in and interact with some Google services, like leaving comments on a YouTube video or reviewing an app in Play, your name and photo appear next to your activity. We may also display this information in <a href="https://support.google.com/accounts?p=privpol_endorse" class="N6CPUe" target="_blank">ads depending on your Shared endorsements setting</a>.</p><h2>When Google shares your information</h2><p>We do not share your personal information with companies, organizations, or individuals outside of Google except in the following cases:</p><h3>With your consent</h3><p>We’ll share personal information outside of Google when we have your consent. For example, if you <a href="https://support.google.com/googlehome?p=privpol_homedata" class="N6CPUe" target="_blank">use Google Home to make a reservation</a> through a booking service, we’ll get your permission before sharing your name or phone number with the restaurant. We’ll ask for your explicit consent to share any <a class="g1mG8c" href="privacy#footnote-sensitive-info" data-name="sensitive-info" jsaction="click:IPbaae(preventDefault=true)">sensitive personal information</a>.</p><h3>With domain administrators</h3><p>If you’re a student or work for an organization that uses Google services, your <a href="https://support.google.com/a?p=privpol_admin" class="N6CPUe" target="_blank">domain administrator</a> and resellers who manage your account will have access to your Google Account. They may be able to:</p><ul><li>Access and retain information stored in your account, like your email</li><li>View statistics regarding your account, like how many apps you install</li><li>Change your account password</li><li>Suspend or terminate your account access</li><li>Receive your account information in order to satisfy applicable law, regulation, legal process, or enforceable governmental request</li><li>Restrict your ability to delete or edit your information or your privacy settings</li></ul><h3>For external processing</h3><p>We provide personal information to our <a class="g1mG8c" href="privacy#footnote-affiliates" data-name="affiliates" jsaction="click:IPbaae(preventDefault=true)">affiliates</a> and other trusted businesses or persons to process it for us, based on our instructions and in compliance with our Privacy Policy and any other appropriate confidentiality and security measures. For example, we use service providers to help us with customer support.</p><h3>For legal reasons</h3><p>We will share personal information outside of Google if we have a good-faith belief that access, use, preservation, or disclosure of the information is reasonably necessary to:</p><ul><li>Meet any applicable law, regulation, <a class="g1mG8c" href="privacy#footnote-legal" data-name="legal" jsaction="click:IPbaae(preventDefault=true)">legal process, or enforceable governmental request</a>. We share information about the number and type of requests we receive from governments in our <a href="https://transparencyreport.google.com/user-data/overview" class="N6CPUe" target="_blank">Transparency Report</a>.</li><li>Enforce applicable Terms of Service, including investigation of potential violations.</li><li>Detect, prevent, or otherwise address fraud, security, or technical issues.</li><li>Protect against harm to the rights, property or safety of Google, our users, or the public as required or permitted by law.</li></ul><p>We may share <a class="g1mG8c" href="privacy#footnote-info" data-name="info" jsaction="click:IPbaae(preventDefault=true)">non-personally identifiable information</a> publicly and with our partners — like publishers, advertisers, developers, or rights holders. For example, we share information publicly to <a class="g1mG8c" href="privacy#footnote-trends" data-name="trends" jsaction="click:IPbaae(preventDefault=true)">show trends</a> about the general use of our services. We also allow <a class="g1mG8c" href="privacy#footnote-specific-partners" data-name="specific-partners" jsaction="click:IPbaae(preventDefault=true)">specific partners</a> to collect information from your browser or device for advertising and measurement purposes using their own cookies or similar technologies.</p><p>If Google is involved in a merger, acquisition, or sale of assets, we’ll continue to ensure the confidentiality of your personal information and give affected users notice before personal information is transferred or becomes subject to a different privacy policy.</p></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="infosecurity" class="ahbJ5"></div><div class="pjyxF m2dIJf"><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/fb61fc4bfc85ad86f11342e699d685e9.svg"/></div><h1>Keeping your information secure</h1><p class="vxK8q">We build security into our services to protect your information</p><p>All Google products are built with strong security features that continuously protect your information. The insights we gain from maintaining our services help us detect and automatically block security threats from ever reaching you. And if we do detect something risky that we think you should know about, we’ll notify you and help guide you through steps to stay better protected.</p><p>We work hard to protect you and Google from unauthorized access, alteration, disclosure, or destruction of information we hold, including:</p><ul><li>We use encryption to keep your data private while in transit</li><li>We offer a range of security features, like <a href="https://safebrowsing.google.com/?utm_source=pp" class="N6CPUe" target="_blank">Safe Browsing</a>, Security Checkup, and <a href="https://www.google.com/landing/2step/?utm_source=pp" class="N6CPUe" target="_blank">2 Step Verification</a> to help you protect your account</li><li>We review our information collection, storage, and processing practices, including physical security measures, to prevent unauthorized access to our systems</li><li>We restrict access to personal information to Google employees, contractors, and agents who need that information in order to process it. Anyone with this access is subject to strict contractual confidentiality obligations and may be disciplined or terminated if they fail to meet these obligations.</li></ul></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="infodelete" class="ahbJ5"></div><div class="pjyxF m2dIJf"><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/13062c65605335a46d14656c46af3868.svg"/></div><h1>Exporting &amp; deleting your information</h1><p class="vxK8q">You can export a copy of your information or delete it from your Google Account at any time</p><p>You can export a copy of content in your Google Account if you want to back it up or use it with a service outside of Google.</p><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM " alt="" src="https://www.gstatic.com/policies/privacy/5959e84c2197c8a27da0a717f1cd47d5.svg"/></div><div class="gwGFXb"><p class="n8ZyWe"><a href="https://takeout.google.com/?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-takeout">Export your data</a></p></div></div><p>To delete your information, you can:</p><ul><li>Delete your content from <a class="g1mG8c" href="privacy#footnote-delete-specific" data-name="delete-specific" jsaction="click:IPbaae(preventDefault=true)">specific Google services</a></li><li>Search for and then delete specific items from your account using <a href="https://myactivity.google.com/?utm_source=pp" class="N6CPUe" target="_blank">My Activity</a></li><li><a href="https://myaccount.google.com/deleteservices?utm_source=pp" class="N6CPUe" target="_blank">Delete specific Google products</a>, including your information associated with those products</li><li><a href="https://myaccount.google.com/deleteaccount?utm_source=pp" class="N6CPUe" target="_blank">Delete your entire Google Account</a></li></ul><div class="h0yEnd"><div class="IN2z4b"><img class="mZPFM " alt="" src="https://www.gstatic.com/policies/privacy/1fa3e4ce8ac456f39ed02a6f9eb49b14.svg"/></div><div class="gwGFXb"><p class="n8ZyWe"><a href="https://myaccount.google.com/delete-services-or-account?utm_source=pp" class="ky8S2" data-track-as="pgc-pp-delete">Delete your information</a></p></div></div></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="inforetaining" class="ahbJ5"></div>
<h1>Retaining your information</h1><p>We retain the data we collect for different periods of time depending on what it is, how we use it, and how you configure your settings:</p><ul><li>Some data you can delete whenever you like, such as the content you create or upload. You can also delete <a href="https://myactivity.google.com/myactivity" class="N6CPUe" target="_blank">activity information</a> saved in your account, or <a href="https://support.google.com/accounts/answer/465?authuser=0#auto-delete" class="N6CPUe" target="_blank">choose to have it deleted automatically</a> after a set period of time.</li><li>Other data is deleted or anonymized automatically after a set period of time, such as <a href="technologies/ads">advertising data</a> in server logs.</li><li>We keep some data until you delete your Google Account, such as information about how often you use our services.</li><li>And some data we retain for longer periods of time when necessary for legitimate business or legal purposes, such as security, fraud and abuse prevention, or financial record-keeping.</li></ul><p>When you delete data, we follow a deletion process to make sure that your data is safely and completely removed from our servers or retained only in anonymized form. We try to ensure that our services protect information from accidental or malicious deletion. Because of this, there may be delays between when you delete something and when copies are deleted from our active and backup systems.</p><p>You can read more about Google’s <a href="technologies/retention">data retention periods</a>, including how long it takes us to delete your information.</p></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="enforcement" class="ahbJ5"></div><div class="pjyxF m2dIJf"><img class="zZLvvc" alt="" src="https://www.gstatic.com/policies/privacy/e60586c0029adec0bacd3e48470ca6c6.svg"/></div><h1>Compliance &amp; cooperation with regulators</h1><p>We regularly review this Privacy Policy and make sure that we process your information in ways that comply with it.</p><h2>Data transfers</h2><p>We maintain <a class="g1mG8c" href="privacy#footnote-servers" data-name="servers" jsaction="click:IPbaae(preventDefault=true)">servers around the world</a> and your information may be processed on servers located outside of the country where you live. Data protection laws vary among countries, with some providing more protection than others. Regardless of where your information is processed, we apply the same protections described in this policy. We also comply with certain <a href="privacy/frameworks">legal frameworks</a> relating to the transfer of data.</p><p>When we receive formal written complaints, we respond by contacting the person who made the complaint. We work with the appropriate regulatory authorities, including local data protection authorities, to resolve any complaints regarding the transfer of your data that we cannot resolve with you directly.</p></div></div><div class=" xXnO1d"><div class="nrAB0c"><div id="about" class="ahbJ5"></div><h1>About this policy</h1><h2>When this policy applies</h2><p>This Privacy Policy applies to all of the services offered by Google LLC and its <a class="g1mG8c" href="privacy#footnote-affiliates" data-name="affiliates" jsaction="click:IPbaae(preventDefault=true)">affiliates</a>, including YouTube, Android, and services offered on third-party sites, such as advertising services. This Privacy Policy doesn’t apply to services that have separate privacy policies that do not incorporate this Privacy Policy.</p><p>This Privacy Policy doesn’t apply to:</p><ul><li>The information practices of other companies and organizations that advertise our services</li><li>Services offered by other companies or individuals, including products or sites that may include Google services, be displayed to you in search results, or be linked from our services</li></ul><div id="policychanges" class="ahbJ5"></div><h2>Changes to this policy</h2><p>We change this Privacy Policy from time to time. We will not reduce your rights under this Privacy Policy without your explicit consent. We always indicate the date the last changes were published and we offer access to <a href="privacy/archive">archived versions</a> for your review. If changes are significant, we’ll provide a more prominent notice (including, for certain services, email notification of Privacy Policy changes).</p></div></div><div class="m9JGT xXnO1d"><div class="nrAB0c"><div id="products" class="ahbJ5"></div><h1>Related privacy practices</h1><h2>Specific Google services</h2><p>The following privacy notices provide additional information about some Google services:</p><ul><li><a href="https://www.google.com/chrome/intl/en/privacy.html" class="N6CPUe" target="_blank">Chrome & the Chrome Operating System</a></li><li><a href="https://payments.google.com/legaldocument?family=0.privacynotice&hl=en" class="N6CPUe" target="_blank">Payments</a></li><li><a href="https://fiber.google.com/legal/privacy.html" class="N6CPUe" target="_blank">Fiber</a></li><li><a href="https://fi.google.com/about/tos/#project-fi-privacy-notice" class="N6CPUe" target="_blank">Google Fi</a></li><li><a href="https://www.google.com/work/apps/terms/education_privacy.html" class="N6CPUe" target="_blank">G Suite for Education</a></li><li><a href="https://readalong.google/intl/en_AU/privacy" class="N6CPUe" target="_blank">Read Along</a></li><li><a href="https://kids.youtube.com/privacynotice" class="N6CPUe" target="_blank">YouTube Kids</a></li><li><a href="https://families.google.com/familylink/privacy/child-policy/" class="N6CPUe" target="_blank">Google Accounts Managed with Family Link, for Children under 13 (or applicable age in your country)</a></li><li><a href="https://assistant.google.com/privacy-notice-childrens-features/" class="N6CPUe" target="_blank">Voice and Audio Collection from Children’s Features on the Google Assistant</a></li></ul><h2>Other useful resources</h2><p>The following links highlight useful resources for you to learn more about our practices and privacy settings.</p><ul><li><a href="https://myaccount.google.com/" class="N6CPUe" target="_blank">Your Google Account</a> is home to many of the settings you can use to manage your account</li><li><a href="https://myaccount.google.com/privacycheckup?utm_source=pp&amp;utm_medium=Promo-in-product&amp;utm_campaign=pp_body" class="N6CPUe" target="_blank">Privacy Checkup</a> guides you through key privacy settings for your Google Account</li><li><a href="https://www.google.com/intl/en/safetycenter/" class="N6CPUe" target="_blank">Google’s safety center</a> helps you learn more about our built-in security, privacy controls, and tools to help set digital ground rules for your family online</li><li><a href="">Privacy & Terms</a> provides more context regarding this Privacy Policy and our Terms of Service</li><li><a href="technologies">Technologies</a> includes more information about:<ul><li><a href="technologies/cookies">How Google uses cookies</a></li><li>Technologies used for <a href="technologies/ads">Advertising</a></li><li><a href="technologies/pattern-recognition">How Google uses pattern recognition</a> to recognize things like faces in photos</li><li><a href="technologies/partner-sites">How Google uses information from sites or apps that use our services</a></li></ul></li></ul></div></div><div class="S2BGZc"><div class="nrAB0c"><div id="key-terms" class="ahbJ5"></div><h2>Key terms</h2><h3 id="footnote-affiliates">Affiliates</h3><p>An affiliate is an entity that belongs to the Google group of companies, including the following companies that provide consumer services in the EU: Google Ireland Limited, Google Commerce Ltd, Google Payment Corp, and Google Dialer Inc. Learn more about the <a href="https://privacy.google.com/businesses/affiliates">companies providing business services in the EU</a>.</p><h3 id="footnote-algorithm">Algorithm</h3><p>A process or set of rules followed by a computer in performing problem-solving operations.</p><h3 id="footnote-application-data-cache">Application data cache</h3><p>An application data cache is a data repository on a device. It can, for example, enable a web application to run without an internet connection and improve the performance of the application by enabling faster loading of content.</p><h3 id="footnote-browser-storage">Browser web storage</h3><p>Browser web storage enables websites to store data in a browser on a device. When used in "local storage" mode, it enables data to be stored across sessions. This makes data retrievable even after a browser has been closed and reopened. One technology that facilitates web storage is HTML 5.</p><h3 id="footnote-cookies">Cookies</h3><p>A cookie is a small file containing a string of characters that is sent to your computer when you visit a website. When you visit the site again, the cookie allows that site to recognize your browser. Cookies may store user preferences and other information. You can configure your browser to refuse all cookies or to indicate when a cookie is being sent. However, some website features or services may not function properly without cookies. Learn more about <a href="technologies/cookies">how Google uses cookies</a> and how Google uses data, including cookies, <a href="technologies/partner-sites">when you use our partners' sites or apps</a>.</p><h3 id="footnote-device">Device</h3><p>A device is a computer that can be used to access Google services. For example, desktop computers, tablets, smart speakers, and smartphones are all considered devices.</p><h3 id="footnote-account">Google Account</h3><p>You may access some of our services by signing up for a <a href="https://myaccount.google.com/">Google Account</a> and providing us with some personal information (typically your name, email address, and a password). This account information is used to authenticate you when you access Google services and protect your account from unauthorized access by others. You can edit or delete your account at any time through your Google Account settings.</p><h3 id="footnote-ip">IP address</h3><p>Every device connected to the Internet is assigned a number known as an Internet protocol (IP) address. These numbers are usually assigned in geographic blocks. An IP address can often be used to identify the location from which a device is connecting to the Internet.</p><h3 id="footnote-info">Non-personally identifiable information</h3><p>This is information that is recorded about users so that it no longer reflects or references an individually-identifiable user.</p><h3 id="footnote-personal-info">Personal information</h3><p>This is information that you provide to us which personally identifies you, such as your name, email address, or billing information, or other data that can be reasonably linked to such information by Google, such as information we associate with your Google Account.</p><h3 id="footnote-pixel">Pixel tag</h3><p>A pixel tag is a type of technology placed on a website or within the body of an email for the purpose of tracking certain activity, such as views of a website or when an email is opened. Pixel tags are often used in combination with cookies.</p><h3 id="footnote-referrer-url">Referrer URL</h3><p>A Referrer URL (Uniform Resource Locator) is information transmitted to a destination webpage by a web browser, typically when you click a link to that page. The Referrer URL contains the URL of the last webpage the browser visited.</p><h3 id="footnote-sensitive-info">Sensitive personal information</h3><p>This is a particular category of personal information relating to topics such as confidential medical facts, racial or ethnic origins, political or religious beliefs, or sexuality.</p><h3 id="footnote-server-logs">Server logs</h3><p>Like most websites, our servers automatically record the page requests made when you visit our sites. These “server logs” typically include your web request, Internet Protocol address, browser type, browser language, the date and time of your request, and one or more cookies that may uniquely identify your browser.</p><p>A typical log entry for a search for “cars” looks like this:</p><pre>123.45.67.89 - 25/Mar/2003 10:15:32 -<br>http&#58;//www.google.com/search?q=cars -<br>Firefox 1.0.7; Windows NT 5.1 -<br>740674ce2123e969</pre><ul><li><code>123.45.67.89</code> is the Internet Protocol address assigned to the user by the user’s ISP. Depending on the user’s service, a different address may be assigned to the user by their service provider each time they connect to the Internet.</li><li><code>25/Mar/2003 10:15:32</code> is the date and time of the query.</li><li><code>http&#58;//www.google.com/search?q=cars</code> is the requested URL, including the search query.</li><li><code>Firefox 1.0.7; Windows NT 5.1</code> is the browser and operating system being used.</li><li><code>740674ce2123a969</code> is the unique cookie ID assigned to this particular computer the first time it visited Google. (Cookies can be deleted by users. If the user has deleted the cookie from the computer since the last time they’ve visited Google, then it will be the unique cookie ID assigned to their device the next time they visit Google from that particular device).</li></ul><h3 id="footnote-unique-id">Unique identifiers</h3><p>A unique identifier is a string of characters that can be used to uniquely identify a browser, app, or device. Different identifiers vary in how permanent they are, whether they can be reset by users, and how they can be accessed.</p><p>Unique identifiers can be used for various purposes, including security and fraud detection, syncing services such as your email inbox, remembering your preferences, and providing personalized advertising. For example, unique identifiers stored in cookies help sites display content in your browser in your preferred language. You can configure your browser to refuse all cookies or to indicate when a cookie is being sent. Learn more about <a href="technologies/cookies">how Google uses cookies</a>.</p><p>On other platforms besides browsers, unique identifiers are used to recognize a specific device or app on that device. For example, a unique identifier such as the Advertising ID is used to provide relevant advertising on Android devices, and can be <a href="technologies/ads">managed</a> in your device’s settings. Unique identifiers may also be incorporated into a device by its manufacturer (sometimes called a universally unique ID or UUID), such as the IMEI-number of a mobile phone. For example, a device’s unique identifier can be used to customize our service to your device or analyze device issues related to our services.</p><h2>Additional Context</h2><h3 id="footnote-useful-ads">ads you’ll find most useful</h3><p>For example, if you watch videos about baking on YouTube, you may see more ads that relate to baking as you browse the web. We also may use your IP address to determine your approximate location, so that we can serve you ads for a nearby pizza delivery service if you search for “pizza.” Learn more <a href="https://support.google.com/accounts?p=privpol_whyad">about Google ads</a> and <a href="https://support.google.com/accounts?p=privpol_whyad">why you may see particular ads</a>.</p><h3 id="footnote-ad-services">advertising and research services on their behalf</h3><p>For example, advertisers may upload data from their loyalty-card programs so that they can better understand the performance of their ad campaigns. We only provide aggregated reports to advertisers that don’t reveal information about individual people.</p><h3 id="footnote-android-device">Android device with Google apps</h3><p>Android devices with Google apps include devices sold by Google or one of our partners and include phones, cameras, vehicles, wearables, and televisions. These devices use Google Play Services and other pre-installed apps that include services like Gmail, Maps, your phone’s camera and phone dialer, text-to-speech conversion, keyboard input, and security features.</p><h3 id="footnote-combine-info">combine the information we collect</h3><p>Some examples of how we combine the information we collect include:</p><ul><li>When you’re signed in to your Google Account and search on Google, you can see search results from the public web, along with relevant information from the content you have in other Google products, like Gmail or Google Calendar. This can include things like the status of your upcoming flights, restaurant, and hotel reservations, or your photos. <a href="https://support.google.com/websearch?p=privpol_privresults&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></li><li>If you have communicated with someone via Gmail and want to add them to a Google Doc or an event in Google Calendar, Google makes it easy to do so by autocompleting their email address when you start to type in their name. This feature makes it easier to share things with people you know. <a href="https://support.google.com/accounts?p=autocontacts&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></li><li>The Google app can use data that you have stored in other Google products to show you personalized content, depending on your settings. For example, if you have searches stored in your Web & App Activity, the Google app can show you news articles and other information about your interests, like sports scores, based your activity. <a href="https://support.google.com/websearch?p=privpol_feed&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></li><li>If you link your Google Account to your Google Home, you can manage your information and get things done through the Google Assistant. For example, you can add events to your Google Calendar or get your schedule for the day, ask for status updates on your upcoming flight, or send information like driving directions to your phone. <a href="https://support.google.com/googlehome?p=privpol_actions&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></li></ul><h3 id="footnote-customized-search">customized search results</h3><p>For example, when you’re signed in to your Google Account and have the Web & App Activity control enabled, you can get more relevant search results that are based on your previous searches and activity from other Google services. You can <a href="https://support.google.com/websearch?p=privpol_searchactivity">learn more here</a>. You may also get customized search results even when you’re signed out. If you don’t want this level of search customization, you can <a href="https://support.google.com/websearch?p=privpol_incognito">search and browse privately</a> or turn off <a href="https://www.google.com/history/optout?utm_source=pp">signed-out search personalization</a>.</p><h3 id="footnote-deliver-services">deliver our services</h3><p>Examples of how we use your information to deliver our services include:</p><ul><li>We use the IP address assigned to your device to send you the data you requested, such as loading a YouTube video</li><li>We use unique identifiers stored in cookies on your device to help us authenticate you as the person who should have access to your Google Account</li><li>Photos and videos you upload to Google Photos are used to help you create albums, animations, and other creations that you can share. <a href="https://support.google.com/photos?p=privpol_manage">Learn more</a></li><li>A flight confirmation email you receive may be used to create a “check-in” button that appears in your Gmail</li><li>When you purchase services or physical goods from us, you may provide us information like your shipping address or delivery instructions. We use this information for things like processing, fulfilling, and delivering your order, and to provide support in connection with the product or service you purchase.</li></ul><h3 id="footnote-detect-abuse">detect abuse</h3><p>When we detect spam, malware, illegal content, and other forms of abuse on our systems in violation of our policies, we may disable your account or take other appropriate action. In certain circumstances, we may also report the violation to appropriate authorities.</p><h3 id="footnote-devices">devices</h3><p>For example, we can use information from your devices to help you decide which device you’d like to use to install an app or view a movie you buy from Google Play. We also use this information to help protect your account.</p><h3 id="footnote-improve">ensure and improve</h3><p>For example, we analyze how people interact with advertising to improve the performance of our ads.</p><h3 id="footnote-ensure-working">ensure our services are working as intended</h3><p>For example, we continuously monitor our systems to look for problems. And if we find something wrong with a specific feature, reviewing activity information collected before the problem started allows us to fix things more quickly.</p><h3 id="footnote-near-device">Information about things near your device</h3><p>If you use Google’s Location services on Android, we can improve the performance of apps that rely on your location, like Google Maps. If you use Google’s Location services, your device sends information to Google about its location, sensors (like accelerometer), and nearby cell towers and Wi-Fi access points (like MAC address and signal strength). All these things help to determine your location. You can use your device settings to enable Google Location services. <a href="https://support.google.com/accounts?p=privpol_androidloc&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></p><h3 id="footnote-legal">legal process, or enforceable governmental request</h3><p>Like other technology and communications companies, Google regularly receives requests from governments and courts around the world to disclose user data. Respect for the privacy and security of data you store with Google underpins our approach to complying with these legal requests. Our legal team reviews each and every request, regardless of type, and we frequently push back when a request appears to be overly broad or doesn’t follow the correct process. Learn more in our <a href="https://transparencyreport.google.com/user-data/overview">Transparency Report</a>.</p><h3 id="footnote-make-improvements">make improvements</h3><p>For example, we use cookies to analyze how people interact with our services. And that analysis can help us build better products. For example, it may help us discover that it’s taking people too long to complete a certain task or that they have trouble finishing steps at all. We can then redesign that feature and improve the product for everyone.</p><h3 id="footnote-link-info">may link information</h3><p>Google Analytics relies on first-party cookies, which means the cookies are set by the Google Analytics customer. Using our systems, data generated through Google Analytics can be linked by the Google Analytics customer and by Google to third-party cookies that are related to visits to other websites. For example, an advertiser may want to use its Google Analytics data to create more relevant ads, or to further analyze its traffic. <a href="https://support.google.com/analytics?p=privpol_data&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></p><h3 id="footnote-partner">partner with Google</h3><p>There are over 2 million non-Google websites and apps that partner with Google to show ads. <a href="https://support.google.com/accounts?p=privpol_controlads&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></p><h3 id="footnote-payment-info">payment information</h3><p>For example, if you add a credit card or other payment method to your Google Account, you can use it to buy things across our services, like apps in the Play Store. We may also ask for other information, like a business tax ID, to help process your payment. In some cases, we may also need to verify your identity and may ask you for information to do this.</p><p>We may also use payment information to verify that you meet age requirements, if, for example, you enter an incorrect birthday indicating you’re not old enough to have a Google Account. <a href="https://support.google.com/accounts?p=privpol_agereq&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></p><h3 id="footnote-personalized-ads">personalized ads</h3><p>You may also see personalized ads based on information from the advertiser. If you shopped on an advertiser's website, for example, they can use that visit information to show you ads. <a href="https://support.google.com/accounts?p=privpol_whyad&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></p><h3 id="footnote-phone-number">phone number</h3><p>If you add your phone number to your account, it can be used for different purposes across Google services, depending on your settings. For example, your phone number can be used to help you access your account if you forget your password, help people find and connect with you, and make the ads you see more relevant to you. <a href="https://support.google.com/accounts?p=privpol_phone&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></p><h3 id="footnote-against-abuse">protect against abuse</h3><p>For example, information about security threats can help us notify you if we think your account has been compromised (at which point we can help you take steps to protect your account).</p><h3 id="footnote-sources">publicly accessible sources</h3><p>For example, we may collect information that’s publicly available online or from other public sources to help train Google’s language models and build features like Google Translate.</p><h3 id="footnote-rely-on-cookies">rely on cookies to function properly</h3><p>For example, we use a cookie called ‘lbcs’ that makes it possible for you to open many Google Docs in one browser. Blocking this cookie would prevent Google Docs from working as expected. <a href="technologies/cookies#types-of-cookies">Learn more</a></p><h3 id="footnote-safety-reliability">safety and reliability</h3><p>Some examples of how we use your information to help keep our services safe and reliable include:</p><ul><li>Collecting and analyzing IP addresses and cookie data to protect against automated abuse. This abuse takes many forms, such as sending spam to Gmail users, stealing money from advertisers by fraudulently clicking on ads, or censoring content by launching a Distributed Denial of Service (DDoS) attack.</li><li>The “last account activity” feature in Gmail can help you find out if and when someone accessed your email without your knowledge. This feature shows you information about recent activity in Gmail, such as the IP addresses that accessed your mail, the associated location, and the date and time of access. <a href="https://support.google.com/mail?p=privpol_signinactivity&amp;hl=en_US" target="_blank" rel="noreferrer noopener">Learn more</a></li></ul><h3 id="footnote-sensitive-categories">sensitive categories</h3><p>When showing you personalized ads, we use topics that we think might be of interest to you based on your activity. For example, you may see ads for things like "Cooking and Recipes" or "Air Travel.” We don’t use topics or show personalized ads based on sensitive categories like race, religion, sexual orientation, or health. And we <a href="https://support.google.com/adwordspolicy?p=privpol_p13nad">require the same from advertisers</a> that use our services.</p><h3 id="footnote-sensor-data">Sensor data from your device</h3><p>Your device may have sensors that can be used to better understand your location and movement. For example, an accelerometer can be used to determine your speed and a gyroscope to figure out your direction of travel.</p><h3 id="footnote-servers">servers around the world</h3><p>For example, we operate data centers located <a href="https://www.google.com/about/datacenters/inside/locations">around the world</a> to help keep our products continuously available for users.</p><h3 id="footnote-calls-messages">services to make and receive calls or send and receive messages</h3><p>Examples of these services include:</p><ul><li>Google Hangouts, for making domestic and international calls</li><li>Google Voice, for making calls, sending text messages, and managing voicemail</li><li>Google Fi, for a phone plan</li></ul><h3 id="footnote-trends">show trends</h3><p>When lots of people start searching for something, it can provide useful information about particular trends at that time. Google Trends samples Google web searches to estimate the popularity of searches over a certain period of time and shares those results publicly in aggregated terms. <a href="https://support.google.com/trends?p=privpol_about">Learn more</a></p><h3 id="footnote-delete-specific">specific Google services</h3><p>For example, you can delete <a href="https://support.google.com/blogger?p=privpol_blog">your blog</a> from Blogger or <a href="https://support.google.com/sites?p=privpol_delete">a Google Site you own</a> from Google Sites. You can also delete <a href="https://support.google.com/googleplay?p=privpol_review">reviews</a> you’ve left on apps, games, and other content in the Play Store.</p><h3 id="footnote-specific-partners">specific partners</h3><p>For example, we allow YouTube creators and advertisers to work with measurement companies to learn about the audience of their YouTube videos or ads, using cookies or similar technologies. Another example is merchants on our shopping pages, who use cookies to understand how many different people see their product listings. <a href="privacy/google-partners">Learn more</a> about these partners and how they use your information.</p><h3 id="footnote-chrome-sync">synced with your Google Account</h3><p>Your Chrome browsing history is only saved to your account if you’ve enabled Chrome synchronization with your Google Account. <a href="https://support.google.com/chrome?p=privpol_chrsync">Learn more</a></p><h3 id="footnote-people-online">the people who matter most to you online</h3><p>For example, when you type an address in the To, Cc, or Bcc field of an email you're composing, Gmail will suggest addresses based on the people you <a href="https://contacts.google.com">contact most frequently</a>.</p><h3 id="footnote-third-parties">third parties</h3><p>For example, we process your information to report use statistics to rights holders about how their content was used in our services. We may also process your information if people search for your name and we display search results for sites containing publicly available information about you.</p><h3 id="footnote-content-views">Views and interactions with content and ads</h3><p>For example, we collect information about views and interactions with ads so we can provide aggregated reports to advertisers, like telling them whether we served their ad on a page and whether the ad was likely seen by a viewer. We may also measure other interactions, such as how you move your mouse over an ad or if you interact with the page on which the ad appears.</p><h3 id="footnote-other-sites">your activity on other sites and apps</h3><p>This activity might come from your use of Google services, like from syncing your account with Chrome or your visits to sites and apps that partner with Google. Many websites and apps partner with Google to improve their content and services. For example, a website might use our advertising services (like AdSense) or analytics tools (like Google Analytics), or it might embed other content (such as videos from YouTube). These services may share information about your activity with Google and, depending on your <a href="https://myaccount.google.com/">account settings</a> and the products in use (for instance, when a partner uses Google Analytics in conjunction with our advertising services), this data may be associated with your personal information.</p><p><a href="technologies/partner-sites">Learn more</a> about how Google uses data when you use our partners' sites or apps.</p></div></div><div class="oLVHqb qRvogc" jsname="u0col"><div class="RlmvDf"><svg xmlns="https://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#000" class="zPfnJe"><path d="M15.41,16.59L10.83,12l4.58-4.59L14,6l-6,6l6,6L15.41,16.59z"/><path fill="none" d="M0,0h24v24H0V0z"/></svg></div><div class="vsZOJd" jsname="AcaILe"></div></div><div class="kkY60 QTk2yd " jsname="QA0Szd" aria-hidden="true" jscontroller="IavLJc"><div class="hgRBHd" jsaction="click:TvD9Pc"></div><div jsname="bN97Pc" class="Woo1Bb"></div></div><div role="button" class="U26fgb XHsn7e Q6o28" jscontroller="VXdfxd" jsaction="click:cOuCgd; mousedown:UX7yZ; mouseup:lbsD7e; mouseenter:tfO1Yc; mouseleave:JywGue; focus:AHmuwe; blur:O22p3e; contextmenu:mg9Pef;touchstart:p6p2H; touchmove:FwuNnf; touchend:yfqBxc(preventMouseEvents=true|preventDefault=true); touchcancel:JMtRjd;" jsshadow jsname="JRuzad" aria-label="Back to top" aria-disabled="false" tabindex="0"><div class="HaXdpb wb61gb"></div><div class="HRp7vf MbhUzd" jsname="ksKsZd"></div><span jsslot class="Ip8zfc"><img alt="" src="https://www.gstatic.com/images/icons/material/system/svg/keyboard_arrow_up_24px.svg"/></span></div><c-data id="i3"></c-data></c-wiz></div></div><div jscontroller="wmlPKb" jsaction="IBB03b:wKZqRb" data-tracker-id="UA-28138501-1"></div><div jscontroller="yJVP7e" jsaction="rcuQ6b:npT2md"></div></div><c-wiz jsrenderer="wX26lb" class="SGBcfd" jsshadow jsdata="deferred-i4" data-p="%.@.]" jscontroller="krBSJd" jsaction="change:msyOCf(O1htCb)" data-node-index="1;0" jsmodel="hc6Ubd"><div class="Uh4Mac"><div class="JzIyE"><div class="Fq8qrb"><label class="gZggid" for="i5">Change language:</label><select class="iCthae" id="i5" jsname="O1htCb"><option value="af">Afrikaans</option><option value="id">Bahasa Indonesia</option><option value="ms">Bahasa Melayu</option><option value="ca">Català</option><option value="cs">Čeština</option><option value="da">Dansk</option><option value="de">Deutsch</option><option value="et">Eesti</option><option selected value="en">English</option><option value="en-GB">English (United Kingdom)</option><option value="es">Español</option><option value="es-419">Español (Latinoamérica)</option><option value="eu">Euskara</option><option value="fil">Filipino</option><option value="fr">Français</option><option value="fr-CA">Français (Canada)</option><option value="gl">Galego</option><option value="hr">Hrvatski</option><option value="zu">Isizulu</option><option value="is">Íslenska</option><option value="it">Italiano</option><option value="sw">Kiswahili</option><option value="lv">Latviešu</option><option value="lt">Lietuvių</option><option value="hu">Magyar</option><option value="nl">Nederlands</option><option value="no">Norsk</option><option value="pl">Polski</option><option value="pt-BR">Português (Brasil)</option><option value="pt-PT">Português (Portugal)</option><option value="ro">Română</option><option value="sk">Slovenčina</option><option value="sl">Slovenščina</option><option value="sr-Latn">Srpski</option><option value="fi">Suomi</option><option value="sv">Svenska</option><option value="vi">Tiếng Việt</option><option value="tr">Türkçe</option><option value="el">Ελληνικά</option><option value="bg">Български</option><option value="ru">Русский</option><option value="sr">Српски</option><option value="uk">Українська</option><option value="iw">‫עברית‬</option><option value="ur">‫اردو‬</option><option value="ar">‫العربية‬</option><option value="fa">‫فارسی‬</option><option value="am">አማርኛ</option><option value="mr">मराठी</option><option value="hi">हिन्दी</option><option value="bn">বাংলা</option><option value="gu">ગુજરાતી</option><option value="ta">தமிழ்</option><option value="te">తెలుగు</option><option value="kn">ಕನ್ನಡ</option><option value="ml">മലയാളം</option><option value="th">ไทย</option><option value="ko">한국어</option><option value="zh-HK">中文 (香港)</option><option value="zh-CN">中文(简体中文)</option><option value="zh-TW">中文(繁體中文)</option><option value="ja">日本語</option></select></div><ul class="mlNJof"><li class="ad72vb"><a href="https://www.google.com/" class="KZ3Wad">Google</a></li><li class="ad72vb"><a href="https://about.google/" class="KZ3Wad">About Google</a></li><li class="ad72vb"><a href="privacy" class="KZ3Wad">Privacy</a></li><li class="ad72vb"><a href="terms" class="KZ3Wad">Terms</a></li></ul></div></div><c-data id="i4"></c-data></c-wiz></div><c-data id="i1"></c-data></c-wiz>

There's two iframe elements in there. These appear to be required to reproduce the assertion; however, the crash occurs almost instantly - presumably before any content can be loaded. Also, switching the iframe URL scheme from https:// to http:// resulted in the same crash.

However, sed -i 's/https/http/g' /var/www/html/privacy.html prevented the crash, so make of that what you will.

Log:

Browser(34): FrameLoader::load: http://172.16.191.165/privacy.html
USERSPACE(35) ASSERTION FAILED: m_state == State::InBody
../Libraries/LibHTTP/Job.cpp:210
[ProtocolServer(35:35)]: Terminating ProtocolServer(35) due to signal 6
[FinalizerTask(3:3)]: 0xdeadc0de  Kernel::Processor::switch_context(Kernel::Thread*&, Kernel::Thread*&) +181
0xdeadc0de  Kernel::Scheduler::context_switch(Kernel::Thread*) +155
0xdeadc0de  Kernel::Scheduler::pick_next() +857
0xdeadc0de  Kernel::Processor::check_invoke_scheduler() +125
0xdeadc0de  Kernel::Thread::die_if_needed() +163
0xdeadc0de  syscall_handler +2181
0xdeadc0de  syscall_asm_entry +49
0x01ebe214
0x01eb6309
0x01eb6c09
0x01a1b158
0x01f47982
0x01f424da
0x01f42bb9
0x01f37a90
0x01f37d39
0x01f918df
0x01f9197f
0x1081d0cb

[FinalizerTask(3:3)]: Generating coredump for pid: 35
[FinalizerTask(3:3)]: RTC: Year: 2021, month: 1, day: 2, hour: 3, minute: 9, second: 45
CrashDaemon(19): New coredump file: /tmp/coredump/ProtocolServer_35_1609556985
CrashDaemon(19): perror(): open: Permission denied
CrashDaemon(19): Could not open coredump '/tmp/coredump/ProtocolServer_35_1609556985'
CrashReporter(37): perror(): open: Permission denied
awesomekling commented 3 years ago

I can 100% reproduce this with HTTP (not HTTPS) by doing br http://serenityos.org/dromaeo/ FWIW m_state is State::Finished and eof() returns false.

bcoles commented 3 years ago

I can 100% reproduce this with HTTP (not HTTPS) by doing br http://serenityos.org/dromaeo/ FWIW m_state is State::Finished and eof() returns false.

Looks like it's the jQuery script which is causing it. Here's a minimal reproducer.

<script src="jquery.js"></script>

Where jquery.js is http://serenityos.org/dromaeo/jquery.js

alimpfard commented 3 years ago

getting data after having the job be done could mean one of two things I think:

Considering it being over is literally "one empty line after trailers" or "when content-length bytes of body have been read", I suspect it's the first

Update: a little further investigation:

Finishing job up
Job: Flushing received buffers: have 31227 bytes in 1 buffers
Job: Flushing received buffers done: have 0 bytes in 0 buffers
Receivable after finished?!?
Payload bytes received: 0

it appears that on_ready_to_read is firing, but there's nothing to receive. If that's indeed the case, I'm surprised at the HTTPS one failing in the same way.

alimpfard commented 3 years ago

@bcoles I can't reproduce that, am I supposed to just put that mess of HTML in a file and load it in the browser?

bcoles commented 3 years ago

@bcoles I can't reproduce that, am I supposed to just put that mess of HTML in a file and load it in the browser?

$ sudo service apache2 start
$ cd /var/www/html
$ cat test.html
<script src="jquery.js"></script>
$ wget 'http://serenityos.org/dromaeo/jquery.js'

^ that's all you should need

awesomekling commented 3 years ago

Oh maybe it's the presence of the Content-Length header?

If we do get a specific content length from the server, we'll call finish_up() the moment we've got all the bytes we expected. That moves m_state to Finished.

Then we get a subsequent call to on_ready_to_read which is really just the EOF notification. One read() from the socket, and it returns null and moves to eof()==true.

alimpfard commented 3 years ago

Ah, so we get a read notification when we reach EOF. then we should probably read exactly once if we get a read event and we're in Finished (any more and it's a bug?)

alimpfard commented 3 years ago

@bcoles that file doesn't trip it for me (not using apache though, maybe that's part of the problem?)

bcoles commented 3 years ago

@bcoles that file doesn't trip it for me (not using apache though, maybe that's part of the problem?)

It triggered on kling's link too:

But that page also contains a bunch of other content.

FWIW; I checked the content length:

[2021-01-06 09:51:44] root@kali:/var/www/html# wc -c jquery.js 
96763 jquery.js
[2021-01-06 09:51:47] root@kali:/var/www/html# curl -isk http://127.0.0.1/jquery.js | head
HTTP/1.1 200 OK
Date: Wed, 06 Jan 2021 14:52:02 GMT
Server: Apache/2.4.46 (Debian)
Last-Modified: Sat, 28 Nov 2020 22:16:22 GMT
ETag: "179fb-5b5322082f980"
Accept-Ranges: bytes
Content-Length: 96763
Vary: Accept-Encoding
Content-Type: application/javascript
alimpfard commented 3 years ago

Yeah, the link does trigger it, but I was more interested in the HTTPS repro

alimpfard commented 3 years ago

@awesomekling seems like that's the cause for serenityos.org/dromaeo

@@ -125,6 +125,16 @@ void Job::on_socket_connected()
     register_on_ready_to_read([&] {
         if (is_cancelled())
             return;
+
+        if (m_state == State::Finished) {
+            dbg() << "Receivable after finished?!?";
+            auto read_size = 64;
+            auto payload = receive(read_size);
+            ASSERT(payload.is_empty());
+            ASSERT(eof());
+            return;
+        }
+

this is hit, and the assertions are happy. still not sure about HTTPS however.

tomuta commented 3 years ago

When I looked at this code a while back I was pretty confused and the overall code seemed rather brittle. I have written HTTP client and entire HTTP server implementations (without https though), including websockets, based on boost::asio and straight posix a several times over the years (that was before boost::beast was introduced) and the asynchronous callbacks here just confuse the heck out of me. Even when I wrote an asynchronous client implementation in C using only posix I made the framework similar to the model used by boost: essentially an async_read for example that does a read and the callback supplied will be called when that read comes back with data. Rather than a callback that you set whenever data arrives. This makes the state machine logic a whole lot more straight forward and much less error prone. Just my 2c, of course.

awesomekling commented 3 years ago

Just my 2c

Patches welcome :smile:

tomuta commented 3 years ago

Just my 2c

Patches welcome smile

hehe yeah probably not any time soon ;)

ADKaster commented 6 months ago

It appears that this issue was closed back in 2021.