Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.2k
gh-144872: fix heap buffer overflow_PyTokenizer_ensure_utf8#144807
gh-144872: fix heap buffer overflow_PyTokenizer_ensure_utf8#144807pablogsal merged 6 commits intopython:mainfrom
_PyTokenizer_ensure_utf8#144807Conversation
Signed-off-by: Adam <adam@Adam-Workstation.lan>
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
ammaraskar commentedFeb 13, 2026
Thanks for the contribution! Would you mind adding a regression test for this inhttps://github.com/python/cpython/blob/main/Lib/test/test_tokenize.py |
Add a test covering truncated multi-byte UTF-8 sequences at end of input.Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
gpshead commentedFeb 14, 2026
I added a test. (discussed with PSRT) We're not considering this a security issue, |
gpshead commentedFeb 14, 2026
We do like to have issues filed to track things - read up onhttps://devguide.python.org/getting-started/pull-request-lifecycle/#pullrequest while you're working on already public oss-fuzz findings, as they are public it is fine to go ahead and make public PRs. But if you come across any that seem actually security relevant, please reach out via email to the to PSRT, or since you're producing fix PRs maybe just usehttps://github.com/python/cpython/security to drop those in GHSA's for us to look over (many will probably be things we just open directly to the public as a non-concern "more of a bug" like this one) |
Signed-off-by: Adam Korczynski <adam@adalogics.com>
python-cla-botbot commentedFeb 16, 2026 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2026-02-16-12-28-43.gh-issue-144872.k9_Q30.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…9_Q30.rstCo-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
AdamKorcz commentedFeb 16, 2026
@aisk thank you, is it me or you who needs to sign the CLA? |
AdamKorcz commentedFeb 16, 2026
it was me. |
_PyTokenizer_ensure_utf8Misc/NEWS.d/next/Core_and_Builtins/2026-02-16-12-28-43.gh-issue-144872.k9_Q30.rstShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
pablogsal left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
I moved the news entry to Core. THanks a lot for the great work@AdamKorcz 🚀
3fc945d intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@AdamKorcz for the PR, and@pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…ythonGH-144807)(cherry picked from commit3fc945d)Co-authored-by: AdamKorcz <44787359+AdamKorcz@users.noreply.github.com>
Sorry,@AdamKorcz and@pablogsal, I could not cleanly backport this to |
GH-145287 is a backport of this pull request to the3.14 branch. |
…GH-144807) (#145287)Co-authored-by: AdamKorcz <44787359+AdamKorcz@users.noreply.github.com>
pablogsal commentedFeb 27, 2026
@AdamKorcz can you do the 3.13 backport following#144807 (comment) ? |
…_utf8` (pythonGH-144807)(cherry picked from commit3fc945d)Co-authored-by: AdamKorcz <44787359+AdamKorcz@users.noreply.github.com>
GH-145441 is a backport of this pull request to the3.13 branch. |
…GH-144807) (#145441)(cherry picked from commit3fc945d)Co-authored-by: AdamKorcz <44787359+AdamKorcz@users.noreply.github.com>
bedevere-bot commentedMar 3, 2026
|
Uh oh!
There was an error while loading.Please reload this page.
Fixeshttps://issues.oss-fuzz.com/issues/451112368 and#144872
cc@ammaraskar
_PyTokenizer_ensure_utf8#144872