-
Notifications
You must be signed in to change notification settings - Fork 415
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
chore(iast): fix all known memleaks in the native module + safety fixes #10947
Conversation
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
…ace-py into juanjux/leak-in-add-aspect
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
|
Signed-off-by: Juanjo Alvarez <[email protected]>
…ace-py into juanjux/leak-in-add-aspect
BenchmarksBenchmark execution time: 2024-10-07 09:39:52 Comparing candidate commit 75458b3 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 194 metrics, 2 unstable metrics. |
Signed-off-by: Juanjo Alvarez <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.13 2.13
# Navigate to the new working tree
cd .worktrees/backport-2.13
# Create a new branch
git switch --create backport-10947-to-2.13
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c4cfa38673986f41ddb82aa7d027375040ae5c3a
# Push it to GitHub
git push --set-upstream origin backport-10947-to-2.13
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.13 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.14 2.14
# Navigate to the new working tree
cd .worktrees/backport-2.14
# Create a new branch
git switch --create backport-10947-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c4cfa38673986f41ddb82aa7d027375040ae5c3a
# Push it to GitHub
git push --set-upstream origin backport-10947-to-2.14
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.14 Then, create a pull request where the |
…es (#10947) Signed-off-by: Juanjo Alvarez <[email protected]> - Move the `TaintedObjectPtr` from `TaintedObject*` to `share_ptr<TaintedObject>`. This fixes the infamous `flask-appsec-iast-p100` leak on the `add_aspect`. - Fix a leak when iterating a `Py_List` on `AspectJoin`. - Handle a missing case in `AspectOperatorAdd`. - Fix leak in `args_are_text_and_same_type`. - Add some nullptr-checks. Thanks @avara1986 for the joint work on this. - [X] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Signed-off-by: Juanjo Alvarez <[email protected]> Co-authored-by: Alberto Vara <[email protected]> (cherry picked from commit c4cfa38)
…es (#10947) Signed-off-by: Juanjo Alvarez <[email protected]> - Move the `TaintedObjectPtr` from `TaintedObject*` to `share_ptr<TaintedObject>`. This fixes the infamous `flask-appsec-iast-p100` leak on the `add_aspect`. - Fix a leak when iterating a `Py_List` on `AspectJoin`. - Handle a missing case in `AspectOperatorAdd`. - Fix leak in `args_are_text_and_same_type`. - Add some nullptr-checks. Thanks @avara1986 for the joint work on this. - [X] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Signed-off-by: Juanjo Alvarez <[email protected]> Co-authored-by: Alberto Vara <[email protected]> (cherry picked from commit c4cfa38)
A memory leak was introduced in #10540 when "py" was removed from the deny list. This caused a leak in FastAPI with the `pypika` package. #10846 patched the issue, and #10947 resolved it. Now, we're re-enabling those packages. This PR is tested in #10902 ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Signed-off-by: Juanjo Alvarez [email protected]
Description
TaintedObjectPtr
fromTaintedObject*
toshare_ptr<TaintedObject>
. This fixes the infamousflask-appsec-iast-p100
leak on theadd_aspect
.Py_List
onAspectJoin
.AspectOperatorAdd
.args_are_text_and_same_type
.Thanks @avara1986 for the joint work on this.
Checklist
Reviewer Checklist