Skip to content

Fix unsynchronized range over leaseCache.entries - #22129

Merged
ahrtr merged 1 commit into
etcd-io:mainfrom
ahrtr:20260721_leasecache
Jul 21, 2026
Merged

Fix unsynchronized range over leaseCache.entries#22129
ahrtr merged 1 commit into
etcd-io:mainfrom
ahrtr:20260721_leasecache

Conversation

@ahrtr

@ahrtr ahrtr commented Jul 21, 2026

Copy link
Copy Markdown
Member

Fix another minor security issue (see below) related to leaseCache, which is only used by grpc-proxy.

A client of an etcd grpc-proxy started with --experimental-leasing-prefix can crash the shared proxy process. Concurrent Txn (with a range write op) and Get requests trigger a Go runtime 'fatal error: concurrent map iteration and map write' in the proxy's leasingKV singleton, terminating the proxy and denying service to every other client of that proxy.

cc @fuweid @ivanvc @serathius

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
@ahrtr

ahrtr commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

/retest

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.72%. Comparing base (81e09b0) to head (dfcbd55).

Additional details and impacted files

see 21 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #22129      +/-   ##
==========================================
+ Coverage   69.66%   69.72%   +0.05%     
==========================================
  Files         449      449              
  Lines       38177    38173       -4     
==========================================
+ Hits        26597    26616      +19     
+ Misses      10148    10126      -22     
+ Partials     1432     1431       -1     

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81e09b0...dfcbd55. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr
ahrtr merged commit e6a6df6 into etcd-io:main Jul 21, 2026
35 checks passed
@ahrtr

ahrtr commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-3.7

@ahrtr

ahrtr commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-3.6

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@ahrtr: new pull request created: #22149

Details

In response to this:

/cherry-pick release-3.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@ahrtr: new pull request created: #22150

Details

In response to this:

/cherry-pick release-3.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ahrtr

ahrtr commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-3.5

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@ahrtr: new pull request created: #22159

Details

In response to this:

/cherry-pick release-3.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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