[issue45178] Support for linking unnamed temporary files into filesystem on Linux
New submission from WGH : In Linux, it's possible to create an unnamed temporary file in a specified directory by using open with O_TMPFILE flag (as if it was created with random name and immediately unlinked, but atomically). Unless O_EXCL is specified, the file can be then linked into filesystem using linkat syscall. It would be neat if it was possible in Python. There're a couple of things missing: 1) tempfile.TemporaryFile creates a file with O_EXCL flag, which prevents linking it into filesystem. 2) linkat must be called with AT_SYMLINK_FOLLOW flag (otherwise EXDEV is returned), which is broken right now (#37612) -- components: Library (Lib) messages: 401676 nosy: WGH priority: normal severity: normal status: open title: Support for linking unnamed temporary files into filesystem on Linux type: enhancement ___ Python tracker <https://bugs.python.org/issue45178> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?
WGH added the comment: > My patch uses O_EXCL. It makes possible to use linkat() to create a path for > the temporary file (I didn't try it, but I read that it's possible). I don't > know if using O_EXCL should be the default. I think it is the other way around. From the manual: "If O_EXCL is not specified, then linkat(2) can ..." -- nosy: +WGH ___ Python tracker <https://bugs.python.org/issue21515> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29444] Out-of-bounds buffer access in match_getslice_by_index
WGH added the comment: Python 2.7 (CPython and PyPy) and also PyPy's Python 3 adjust the indices, like my patch does, if that matters. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29444> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29444] Out-of-bounds buffer access in match_getslice_by_index
Changes by WGH <w...@torlan.ru>: -- keywords: +patch Added file: http://bugs.python.org/file46518/match_getslice_by_index.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29444> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29444] Out-of-bounds buffer access in match_getslice_by_index
New submission from WGH: In [1]: import re In [2]: b = bytearray(b'A'*100) In [3]: m = re.search(b'A*', b) In [4]: m.group() Out[4]: b'' In [5]: del b[:] In [6]: m.group() Out[6]: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x9a\xc4\xb2i\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' I will attach the patch shortly. -- components: Regular Expressions messages: 286974 nosy: WGH, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Out-of-bounds buffer access in match_getslice_by_index type: security versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29444> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25330] Docs for pkgutil.get_data inconsistent with semantics
WGH added the comment: I think it can even be considered a security bug. A classic path traversal. The fact that documentation falsely suggests that there's no such vulnerability is clearly not helping. Python 2.7 is affected as well, by the way. -- nosy: +WGH ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25330> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25936] Improve FastChildWatcher with WNOWAIT?
New submission from WGH: The problem with FastChildWatcher lies in the fact that it can accidentally reap processes that it doesn't watch. However, os module includes waitid function (since Python 3.3), and it has WNOWAIT flags, which means "return status, let process remain waitable (=don't reap)". What do you think, can this feature fix the problem with FastChildWatcher? -- components: asyncio messages: 256946 nosy: WGH, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: Improve FastChildWatcher with WNOWAIT? ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25936> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com