Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Fix UAF bug in connection limit filter. (#28785)
Browse files Browse the repository at this point in the history
* Fix UAF bug in connection limit filter.

Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
Co-authored-by: Haoruo Lei <haoruolei@microsoft.com>
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
2 people authored and phlax committed Aug 3, 2023
1 parent 8233a40 commit c59ff1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ minor_behavior_changes:

bug_fixes:
# *Changes expected to improve the state of the world and are unlikely to have negative effects*
- area: connection limit
change: |
fixed a use-after-free bug in the connection limit filter.
removed_config_or_runtime:
# *Normally occurs at the end of the* :ref:`deprecation period <deprecated>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Network::FilterStatus Filter::onNewConnection() {
absl::optional<std::chrono::milliseconds> duration = config_->delay();
if (duration.has_value() && duration.value() > std::chrono::milliseconds(0)) {
delay_timer_ = read_callbacks_->connection().dispatcher().createTimer([this]() -> void {
resetTimerState();
read_callbacks_->connection().close(Network::ConnectionCloseType::NoFlush);
});
delay_timer_->enableTimer(duration.value());
Expand Down

0 comments on commit c59ff1f

Please sign in to comment.