Skip to content

glibc ¤

Perform queries specific to the GNU C Library.

Functions:

Attributes:

safe_lnk module-attribute ¤

safe_lnk = add_param(
    "safe-linking",
    None,
    "whether glibc uses safe-linking",
    param_class=PARAM_AUTO_BOOLEAN,
)

glibc_version module-attribute ¤

glibc_version = add_param(
    "glibc",
    "",
    "glibc version for heap heuristics resolution (e.g. 2.31)",
    scope=heap,
)

set_glibc_version ¤

set_glibc_version() -> None

type ¤

type() -> LibcType

version ¤

version(libc_filepath: str) -> tuple[int, ...]

has_internal_symbols ¤

has_internal_symbols(libc_filepath: str) -> bool

has_debug_info ¤

has_debug_info() -> bool

urls ¤

urls(ver: tuple[int, ...] | None) -> LibcURLs

verify_libc_candidate ¤

verify_libc_candidate(mapping_name: str) -> bool

verify_ld_candidate ¤

verify_ld_candidate(mapping_name: str) -> bool

libc_same_as_ld ¤

libc_same_as_ld() -> bool

check_safe_linking ¤

check_safe_linking(ver: tuple[int, ...]) -> bool

Parameters:

  • ver (tuple[int, ...]) –

    The version tuple. Pass pwndbg.libc.version() here.

Safe-linking is a glibc 2.32 mitigation; see: - https://lanph3re.blogspot.com/2020/08/blog-post.html - https://research.checkpoint.com/2020/safe-linking-eliminating-a-20-year-old-malloc-exploit-primitive/