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

Fixes leak in SNIAction name globbing #8827

Merged
merged 1 commit into from
May 6, 2022

Conversation

randall
Copy link
Contributor

@randall randall commented May 5, 2022

pcre_compile allocated object is never pcre_free-ed

@randall randall added the Leak label May 5, 2022
@randall randall added this to the 10.0.0 milestone May 5, 2022
@randall randall self-assigned this May 5, 2022
@randall randall requested a review from bryancall as a code owner May 5, 2022 18:31
@randall
Copy link
Contributor Author

randall commented May 5, 2022

This goes back to at least ATS 9.

bneradt
bneradt previously approved these changes May 5, 2022
pcre_compile allocated object is never pcre_free-ed
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning these leaks up.

@randall randall merged commit efaf441 into apache:master May 6, 2022
@randall randall deleted the fix_leak_sni_glob branch May 6, 2022 19:07
randall added a commit to randall/trafficserver that referenced this pull request May 12, 2022
pcre_compile allocated object is never pcre_free-ed

(cherry picked from commit efaf441)

Conflicts:
    iocore/net/P_SSLSNI.h
    iocore/net/SSLSNIConfig.cc
zwoop pushed a commit that referenced this pull request May 16, 2022
pcre_compile allocated object is never pcre_free-ed

(cherry picked from commit efaf441)
@zwoop
Copy link
Contributor

zwoop commented May 16, 2022

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 May 16, 2022
bryancall pushed a commit that referenced this pull request Jun 13, 2022
pcre_compile allocated object is never pcre_free-ed

(cherry picked from commit efaf441)

Conflicts:
    iocore/net/P_SSLSNI.h
    iocore/net/SSLSNIConfig.cc
moonchen pushed a commit to moonchen/trafficserver that referenced this pull request Jul 26, 2022
* change MemArena::make test to remove memory leak (apache#8352)

(cherry picked from commit 2a6156f)

* Fix leaks in ConfigManager::configName (apache#8269)

This fixes an ASan reported leak of ConfigManager::configName. It used
to be strdup'd but not freed in the destructor. This simply changes it
to a std::string.

ASan also reported a leak in AddConfigFilesHere which is fixed with an
ats_free as well.

(cherry picked from commit ee820c7)

* Lua plugin memory leak on remap configuration reloads (apache#8764)

This fix adds reference counting for the Lua plugin remap instance handles. The reference counting
allows us to eliminate an existing memory leak of the instance handles. In addition, this means
that the old Lua memory allocated by LuaJIT may also be freed via LuaJIT garbage collection.

This fix also adds the '--ljgc' remap instance plugin parameter to the Lua plugin. This paramter
enables on-demand LuaJIT garbage collection while the remap instances are created and deleted.
This is useful when operating close to the LuaJIT memory limit, which is currently 2GB on Linux
using LuaJIT v2.1.0-beta3 from 2017.

Fixes apache#8728

(cherry picked from commit b6f83f1)

* Fixes leak of SNI config filename on load

(cherry picked from commit e99f33c)

* Fixes leak of ssl_ocsp_response_path_only on reload

(cherry picked from commit 18c5404)

* SNIConfig (tunnel_route): Change the way we extract matched subgroups from the server name. (apache#8589)

This now uses the provided offsets from pcre_exec to read each matched group, this avoids
allocating memory for the subgroups. There was a memory leak here as well which is now eliminated.
This also changes the ActionItem::Context vector of strings to a vector of views to keep each matched group.

(cherry picked from commit 4f0c4f2)

Conflicts:
    iocore/net/P_SSLSNI.h
    iocore/net/TLSSNISupport.cc

* Fixes leak in SNIAction name globbing (apache#8827)

pcre_compile allocated object is never pcre_free-ed

(cherry picked from commit efaf441)

Conflicts:
    iocore/net/P_SSLSNI.h

Co-authored-by: Brian Olsen <bnolsen@gmail.com>
Co-authored-by: Brian Neradt <brian.neradt@gmail.com>
Co-authored-by: pbchou <pbchou@labs.att.com>
Co-authored-by: Damian Meden <damian.meden@gmail.com>
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
* asf/9.2.x:
  Updated ChangeLog
  Fix parent_select optional scheme (apache#8831)
  Add `#pragma once` for PendingAction.h (apache#8846)
  Promote class PendingAction from HttpSM.h for use in other classes. (apache#8423)
  Fixes leak in SNIAction name globbing (apache#8827)
  Handle opentelemetry-cpp v1.3.0 upgrade for otel_tracer plugin (apache#8834)
  Fix overflow conditions in prefetch plugin (apache#8660)
  Remove incorrect comment from base64 functions (apache#8835)
  Add autest to cover updates to cache with alternates (apache#8779)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants