From f35e22441a5ed187ba8276e45c83e9b11ebfa3ce Mon Sep 17 00:00:00 2001 From: Giuseppe Lettieri Date: Mon, 28 Oct 2024 18:34:45 +0100 Subject: [PATCH] Don't ignore set safe-linking settings (#2484) * Don't ignore set safe-linking settings The previous code was testing the existance of the safe_lnk option object, which always exists, and therefore was ignoring the actual value of the option. Change the test to safe_lnk.value. * Update pwndbg/glibc.py --------- Co-authored-by: Disconnect3d --- pwndbg/glibc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwndbg/glibc.py b/pwndbg/glibc.py index 5f5337ad7..94e8e7d54 100644 --- a/pwndbg/glibc.py +++ b/pwndbg/glibc.py @@ -197,4 +197,4 @@ def check_safe_linking() -> bool: - https://lanph3re.blogspot.com/2020/08/blog-post.html - https://research.checkpoint.com/2020/safe-linking-eliminating-a-20-year-old-malloc-exploit-primitive/ """ - return (get_version() >= (2, 32) or safe_lnk) and safe_lnk is not False # type: ignore[return-value] + return (get_version() >= (2, 32) or safe_lnk.value) and safe_lnk.value is not False