You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3.12bugs and security fixes3.13bugs and security fixes3.14new features, bugs and security fixeseasyinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
Pointer tstate is compared to a NULL value here, but above there is a dereference. Stack trace: _PySys_AddWarnOptionWithError -> get_warnoptions -> _PySys_GetAttr. Correct code should look like this:
voidPySys_AddWarnOptionUnicode(PyObject*option)
{
PyThreadState*tstate=_PyThreadState_GET();
if (tstate&&_PySys_AddWarnOptionWithError(tstate, option) <0) {
/* No return value, therefore clear error state if possible */_PyErr_Clear(tstate);
}
}
Thanks for spotting this. This still happens on main. Feel free to open a PR (I can do it as well if you want).
Note: 3.11 is security-only and this does not seem to count as a security issue unless someone is able to provide me a PoC of an exploit using that null pointer dereference.
3.12bugs and security fixes3.13bugs and security fixes3.14new features, bugs and security fixeseasyinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
Bug report
Bug description:
Pointer tstate is compared to a NULL value here, but above there is a dereference. Stack trace: _PySys_AddWarnOptionWithError -> get_warnoptions -> _PySys_GetAttr. Correct code should look like this:
CPython versions tested on:
3.11
Operating systems tested on:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: