Steps to reproduce this issue:
- comment out the
print function in demo/run_patched_module.py at line 61.
|
# Payload to be injected |
|
def new_verification(): |
|
print('... Content has been modified ...') |
|
|
- add arbitrary code to make that function work normally. (just make sure there is no
print function in it)
- repeat the function call
modified.foo() as line 73 more than 3 times.
|
# Check the output of modified function |
|
print('--- modified version ---') |
|
modified_mod = load_module_from_path('modified', osp.join(THIS_DIR, 'modified.pyc')) |
|
modified_mod.foo() |
- execute
demo/run_patched_module.py.
Result of execution:
- Ubuntu 18.04, Python 3.6.9 (with gdb):
--- modified version ---
foo
foo
foo
Fatal Python error: deletion of interned string failed
KeyError: ''eyError'
Current thread 0x00007ffff7fd7740 (most recent call first):
File "/media/nale/Data/Users/nale/project/bytejection/demo/pkg/foobarbuzz/core.py", line 8 in foo
File "run_patch_module.py", line 78 in main
File "run_patch_module.py", line 90 in <module>
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
- Ubuntu 18.04, Python 3.7.4 (with gdb):
--- modified version ---
foo
Program received signal SIGSEGV, Segmentation fault.
PyFunction_NewWithQualName ()
at /tmp/build/80754af9/python_1565725737370/work/Objects/funcobject.c:33
33 /tmp/build/80754af9/python_1565725737370/work/Objects/funcobject.c: No such file or directory.
Steps to reproduce this issue:
printfunction indemo/run_patched_module.pyat line 61.bytejection/demo/run_patch_module.py
Lines 59 to 62 in 67a9ca2
printfunction in it)modified.foo()as line 73 more than 3 times.bytejection/demo/run_patch_module.py
Lines 70 to 73 in 67a9ca2
demo/run_patched_module.py.Result of execution: