Skip to content

[3.15] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778) - #156010

Open
serhiy-storchaka wants to merge 1 commit into
python:3.15from
serhiy-storchaka:backport-113318-3.15
Open

[3.15] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778)#156010
serhiy-storchaka wants to merge 1 commit into
python:3.15from
serhiy-storchaka:backport-113318-3.15

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 18, 2026

Copy link
Copy Markdown
Member

(cherry picked from commit 915970c)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…ythonGH-155778)

(cherry picked from commit 915970c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@youknowone

Copy link
Copy Markdown
Contributor

While this is unmerged, 3.15 still crashes on the deletions:

$ python -X faulthandler -c "import sys; del sys._getframe().f_trace_opcodes"
Windows fatal exception: access violation

Current thread 0x0000304c (most recent call first):
  File "<string>", line 1 in <module>
import ssl
c = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
c.check_hostname = False
c.verify_mode = ssl.CERT_NONE
s = c.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO())._sslobj
del s.context   # same for del s.owner and del s.session
Windows fatal exception: access violation

Current thread 0x000019f0 (most recent call first):
  File "s.py", line 6 in <module>

Objects/clinic/frameobject.c.h and Modules/clinic/_ssl.c.h have no
value == NULL without this patch

@hugovk

hugovk commented Sep 9, 2026

Copy link
Copy Markdown
Member

@serhiy-storchaka Please could you get a core peer review on this?

@serhiy-storchaka

Copy link
Copy Markdown
Member Author

@encukou, could you please review this?

@hugovk, this is an ordinary bug fix, it can wait for the next bugfix release.

@encukou

encukou commented Sep 10, 2026

Copy link
Copy Markdown
Member

LGTM, but it should go in 3.16.1.

(IMO it should not be treated as a security issue: we generally treat crashes as exploitable, but deleting arbitrary attributes is arbitrary code execution.)

@serhiy-storchaka

Copy link
Copy Markdown
Member Author

The bug was not new in 3.15. It existed in 3.13 and 3=.14 (although 3.15 might add more cases). It does not affect working (and tested) programs, it cannot be triggered by user data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants