gh-142783: Fix possible use after free in zoneinfo module#142790
gh-142783: Fix possible use after free in zoneinfo module#142790serhiy-storchaka merged 15 commits intopython:mainfrom
Conversation
….zoneinfo'; 'tzdata' is not a package
|
Thanks @fatelei for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @fatelei for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…onGH-142790) (cherry picked from commit 8307a14) Co-authored-by: wangxiaolei <fatelei@gmail.com>
…onGH-142790) (cherry picked from commit 8307a14) Co-authored-by: wangxiaolei <fatelei@gmail.com>
|
GH-142861 is a backport of this pull request to the 3.13 branch. |
|
GH-142862 is a backport of this pull request to the 3.14 branch. |
|
When _weak_cache is a descriptor that creates a new object each time it's accessed, get_weak_cache() incorrectly assumed it could return a borrowed reference and immediately decremented the reference count. This caused the newly created cache object to be freed too early, leading to use-after-free when the cache object was subsequently accessed.
zoneinfo.get_weak_cachevia weak DECREF assumption #142783