Skip to content
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

test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x #88369

Closed
vstinner opened this issue May 21, 2021 · 2 comments
Labels
3.11 only security fixes tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

BPO 44203
Nosy @vstinner, @ericsnowcurrently, @corona10, @nanjekyejoannah, @erlend-aasland

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-09-21.20:06:38.466>
created_at = <Date 2021-05-21.10:48:37.741>
labels = ['tests', '3.11']
title = 'test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x'
updated_at = <Date 2021-09-21.20:06:38.465>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2021-09-21.20:06:38.465>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2021-09-21.20:06:38.466>
closer = 'vstinner'
components = ['Tests']
creation = <Date 2021-05-21.10:48:37.741>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 44203
keywords = []
message_count = 2.0
messages = ['394103', '402354']
nosy_count = 5.0
nosy_names = ['vstinner', 'eric.snow', 'corona10', 'nanjekyejoannah', 'erlendaasland']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue44203'
versions = ['Python 3.11']

@vstinner
Copy link
Member Author

AMD64 Arch Linux Asan 3.x:
https://buildbot.python.org/all/#/builders/582/builds/157

See also:

  • bpo-37224: [subinterpreters] test__xxsubinterpreters fails randomly
  • bpo-44100: test__xxsubinterpreters: test_one() fails in AMD64 Fedora Stable 3.x: "Fatal Python error: Py_EndInterpreter: thread still has a frame"

0:37:59 load avg: 1.07 Re-running test__xxsubinterpreters in verbose mode
(...)
test_from_sibling (test.test__xxsubinterpreters.DestroyTests) ... ok
test_main (test.test__xxsubinterpreters.DestroyTests) ... ok
test_one (test.test__xxsubinterpreters.DestroyTests) ... ok
=================================================================
==16132==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x608000783694 at pc 0x7f20abecb577 bp 0x7fff392627b0 sp 0x7fff392627a0
READ of size 1 at 0x608000783694 thread T0
#0 0x7f20abecb576 in _PyFrame_IsExecuting Include/cpython/frameobject.h:53
#1 0x7f20abecb576 in _is_running /buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:1842
#2 0x7f20abecb576 in interp_is_running /buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:2255
#3 0x55a7ff1daa4f in cfunction_call Objects/methodobject.c:539
(...)
#194 0x55a7fed361f4 in Py_BytesMain Modules/main.c:720

0x608000783694 is located 12 bytes to the left of 96-byte region [0x6080007836a0,0x608000783700)
allocated by thread T0 here:
#0 0x7f20b27b2459 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x55a7ff035572 in _PyObject_GC_Alloc Modules/gcmodule.c:2250
(...)
#8 0x55a7ff24eedd in builtin___build_class__ Python/bltinmodule.c:225
(...)
#17 0x55a7fef8dd90 in exec_code_in_module Python/import.c:771
(...)
#20 0x55a7fefc33f6 in init_importlib Python/pylifecycle.c:141
#21 0x55a7fefc33f6 in pycore_interp_init Python/pylifecycle.c:811
#22 0x55a7fefccf03 in new_interpreter Python/pylifecycle.c:1916
#23 0x55a7fefccf03 in _Py_NewInterpreter Python/pylifecycle.c:1946
#24 0x7f20abec613c in interp_create /buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:2022
(...)

(...)
make: *** [Makefile:1255: buildbottest] Error 1

@vstinner vstinner added 3.11 only security fixes tests Tests in the Lib/test dir labels May 21, 2021
@vstinner
Copy link
Member Author

On the latest build 564, there is no more error:

0:17:51 load avg: 2.50 [169/421] test__xxsubinterpreters passed

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

1 participant