From e4b939dc1ac3e395eab4f9f0d074f00bbc7e450e Mon Sep 17 00:00:00 2001 From: peace-maker Date: Wed, 15 Jan 2025 16:49:02 +0100 Subject: [PATCH 1/2] Poll before reading /proc/maps in `process.libs()` (#2516) Try to avoid race condition of reading memory maps before libraries are loaded. --- pwnlib/tubes/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnlib/tubes/process.py b/pwnlib/tubes/process.py index 73c378771..3b2ec16fa 100644 --- a/pwnlib/tubes/process.py +++ b/pwnlib/tubes/process.py @@ -1323,7 +1323,7 @@ def libs(self): space. """ from pwnlib.util.proc import memory_maps - maps_raw = memory_maps(self.pid) + maps_raw = self.poll() is not None and memory_maps(self.pid) if not maps_raw: import pwnlib.elf.elf From 9472ec1e93a8140781c133479dc19c077b49d50c Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Wed, 15 Jan 2025 16:41:34 +0100 Subject: [PATCH 2/2] Fix building docs on stable Pin to Python 3.12. --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ea7cd7250..965637e0d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,7 +5,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3" + python: "3.12" sphinx: configuration: docs/source/conf.py