Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix proxy configuration crash #3563

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Fix proxy configuration crash #3563

merged 1 commit into from
Jun 14, 2024

Conversation

sherryzy
Copy link
Contributor

Bug:
In url_request_context.cc, we reset proxy_resolution_service_. However, in http_network_session, we store the original proxy_resolution_service_. From url_request_context.cc, if we delete the orignal proxy_resolution_service and create a new object, http_network_session may still try to access the orignal object. This will trigger the heap-use-after-free error.

b/346555722

Bug:
In url_request_context.cc, we reset proxy_resolution_service_. However,
in http_network_session, we store the original proxy_resolution_service_.
From url_request_context.cc, if we delete the orignal proxy_resolution_service
and create a new object, http_network_session may still try to access
the orignal object. This will trigger the heap-use-after-free error.

b/346555722
@kaidokert kaidokert requested a review from johnxwork June 14, 2024 00:03
@sherryzy sherryzy marked this pull request as ready for review June 14, 2024 00:04
@sherryzy sherryzy requested a review from a team as a code owner June 14, 2024 00:04
@kaidokert kaidokert changed the title Fix botguard crosstool test failure Fix proxy configuration crash Jun 14, 2024
Copy link
Member

@kaidokert kaidokert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look wrong to me, and if it fixes the tests lets get it in.

@kaidokert kaidokert enabled auto-merge (squash) June 14, 2024 01:00
@kaidokert kaidokert merged commit 3a90c17 into youtube:main Jun 14, 2024
329 of 330 checks passed
@sherryzy sherryzy added the cp-25.lts.1+ Cherry Pick to the 25.lts.1+ branch label Jun 14, 2024
cobalt-github-releaser-bot pushed a commit that referenced this pull request Jun 14, 2024
Bug:
In url_request_context.cc, we reset proxy_resolution_service_. However,
in http_network_session, we store the original
proxy_resolution_service_. From url_request_context.cc, if we delete the
orignal proxy_resolution_service and create a new object,
http_network_session may still try to access the orignal object. This
will trigger the heap-use-after-free error.

b/346555722

(cherry picked from commit 3a90c17)
kaidokert pushed a commit that referenced this pull request Jun 14, 2024
Refer to the original PR: #3563

Bug:
In url_request_context.cc, we reset proxy_resolution_service_. However,
in http_network_session, we store the original
proxy_resolution_service_. From url_request_context.cc, if we delete the
orignal proxy_resolution_service and create a new object,
http_network_session may still try to access the orignal object. This
will trigger the heap-use-after-free error.

b/346555722

Co-authored-by: Sherry Zhou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cp-25.lts.1+ Cherry Pick to the 25.lts.1+ branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants