[all-commits] [llvm/llvm-project] e1d45b: [lldb] Fix a use-after-free in SymbolFileCTF (#151...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Jul 31 14:15:42 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1d45b1b97c1f18e5a5fb9db8621ae4b34ba0ab1
      https://github.com/llvm/llvm-project/commit/e1d45b1b97c1f18e5a5fb9db8621ae4b34ba0ab1
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-07-31 (Thu, 31 Jul 2025)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp

  Log Message:
  -----------
  [lldb] Fix a use-after-free in SymbolFileCTF (#151586)

This fixes a use-after-free in SymbolFileCTF. Previously, we would
remove the underlying CTF type as soon as we resolved it. However, it's
possible that we're still holding onto the CTF type while we're parsing
a dependent type, like a modifier, resulting in a use-after-free. This
patch addresses the issue by delaying the removal of the CTF type until
the type is fully resolved.

I have a XNU kernel binary that reproduces the issue and confirmed that
this solves the memory issue using ASan. However I haven't been able to
craft types by hand that reproduce this issue for a test case.

rdar://156660866



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list