This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Base 85 encoding initialization race condition
Type: crash Stage: resolved
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: drmonkeysee, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2019-12-16 17:55 by drmonkeysee, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17627 merged drmonkeysee, 2019-12-16 17:55
PR 24020 closed miss-islington, 2020-12-31 09:47
PR 24022 merged serhiy.storchaka, 2020-12-31 12:37
PR 24051 merged miss-islington, 2021-01-01 17:46
Messages (4)
msg358495 - (view) Author: Brandon Stansbury (drmonkeysee) * Date: 2019-12-16 17:55
Under multi-threading scenarios a race condition may occur where a thread sees an initialized `_b85chars` table but an uninitialized `_b85chars2` table due to the guard only checking the first table.

This causes an exception like:

```
  File "/usr/lib/python3.6/base64.py", line 434, in b85encode
    return _85encode(b, _b85chars, _b85chars2, pad),
  File "/usr/lib/python3.6/base64.py", line 294, in _85encode
    for word in words],
  File "/usr/lib/python3.6/base64.py", line 294, in <listcomp>
    for word in words],
 "TypeError: 'NoneType' object is not subscriptable
```
msg384107 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-31 09:44
New changeset 9655434cca5dfbea97bf6d355aec028e840b289c by Brandon Stansbury in branch 'master':
bpo-39068: Fix race condition in base64 (GH-17627)
https://github.com/python/cpython/commit/9655434cca5dfbea97bf6d355aec028e840b289c
msg384190 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-01-01 17:41
New changeset b863607d303a87e8680149361ac987328b35ca5f by Serhiy Storchaka in branch '3.8':
[3.8] bpo-39068: Fix race condition in base64 (GH-17627) (GH-24022)
https://github.com/python/cpython/commit/b863607d303a87e8680149361ac987328b35ca5f
msg384205 - (view) Author: miss-islington (miss-islington) Date: 2021-01-01 20:42
New changeset 0d6e40744ae40ff397883ff90ca235efd3b63f18 by Miss Islington (bot) in branch '3.9':
bpo-39068: Fix race condition in base64 (GH-17627)
https://github.com/python/cpython/commit/0d6e40744ae40ff397883ff90ca235efd3b63f18
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83249
2021-01-01 20:46:37serhiy.storchakasetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.8, Python 3.9, Python 3.10, - Python 3.6
2021-01-01 20:42:52miss-islingtonsetmessages: + msg384205
2021-01-01 17:46:29miss-islingtonsetpull_requests: + pull_request22887
2021-01-01 17:41:52serhiy.storchakasetmessages: + msg384190
2020-12-31 12:37:08serhiy.storchakasetpull_requests: + pull_request22862
2020-12-31 09:47:28miss-islingtonsetkeywords: + patch
nosy: + miss-islington

pull_requests: + pull_request22860
stage: patch review
2020-12-31 09:44:56serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg384107
2019-12-16 18:06:37drmonkeyseesettitle: Base 85 encoding initialization race conditiong -> Base 85 encoding initialization race condition
2019-12-16 17:55:04drmonkeyseecreate