Skip to content

socks: ensure DNS is freed in failure cases.#20813

Merged
cmeister2 merged 1 commit intomasterfrom
cm2/fuzz/447858136
Mar 4, 2026
Merged

socks: ensure DNS is freed in failure cases.#20813
cmeister2 merged 1 commit intomasterfrom
cm2/fuzz/447858136

Conversation

@cmeister2
Copy link
Copy Markdown
Contributor

@cmeister2 cmeister2 commented Mar 4, 2026

In several error cases in socks.c the DNS struct is not freed, which leads to memory leaks.

Found by: OSS-Fuzz: 447858136

Closes #20813

In several error cases in socks.c the DNS struct is not freed, which
leads to memory leaks.

Found by: OSS-Fuzz: 447858136

Closes #20813
@cmeister2 cmeister2 force-pushed the cm2/fuzz/447858136 branch from 05e999e to a05120f Compare March 4, 2026 12:30
@testclutch
Copy link
Copy Markdown

Analysis of PR #20813 at a05120f4:

Test ../../tests/http/test_05_errors.py::TestErrors::test_05_01_partial_1[h3] failed, but it has been 0.8% flaky lately, so it's probably NOT a fault of the PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them).

Generated by Testclutch

@bagder
Copy link
Copy Markdown
Member

bagder commented Mar 4, 2026

@aisle-analyzer augment review

@aisle-research-bot
Copy link
Copy Markdown

aisle-research-bot bot commented Mar 4, 2026

🔒 Aisle Security Analysis

✅ We scanned this PR and did not find any security vulnerabilities.

Aisle supplements but does not replace security review.


Analyzed PR: #20813 at commit a05120f

Last updated on: 2026-03-04T16:43:02Z

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 4, 2026

🤖 Augment PR Summary

Summary: Ensures SOCKS4 hostname resolution cleans up any obtained DNS cache entry in error/unsupported-address paths.
Why: Prevents resolver-related memory leaks in lib/socks.c reported by OSS-Fuzz.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@cmeister2 cmeister2 merged commit 70ec113 into master Mar 4, 2026
220 of 221 checks passed
@cmeister2 cmeister2 deleted the cm2/fuzz/447858136 branch March 4, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants