Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm, slab: Fix infinite loop at _slub_get_freelist() #437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions drgn/helpers/linux/slab.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ def _try_hardened_freelist_dereference(ptr_addr: int) -> int:
def _slub_get_freelist(freelist: Object, freelist_set: Set[int]) -> None:
ptr = freelist.value_()
while ptr:
if ptr in freelist_set:
break
freelist_set.add(ptr)
ptr = self._freelist_dereference(ptr + freelist_offset)

Expand Down