Skip to content

Commit

Permalink
Poll before reading /proc/maps in process.libs() (#2516)
Browse files Browse the repository at this point in the history
Try to avoid race condition of reading memory maps before libraries are loaded.
  • Loading branch information
peace-maker authored Jan 15, 2025
1 parent e341e23 commit e4b939d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnlib/tubes/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4b939d

Please sign in to comment.