[all-commits] [llvm/llvm-project] 610124: [clang] Fix a use-after free in ASTContext::getSub...

Alexander Kornienko via All-commits all-commits at lists.llvm.org
Fri Sep 26 23:39:07 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61012483df44c181f4200a5b6f260d27f2052df1
      https://github.com/llvm/llvm-project/commit/61012483df44c181f4200a5b6f260d27f2052df1
  Author: Alexander Kornienko <alexfh at google.com>
  Date:   2025-09-27 (Sat, 27 Sep 2025)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp

  Log Message:
  -----------
  [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (#160970)

ASTContext::getSubstBuiltinTemplatePack finds InsertPos and then calls
itself
recursively, which may lead to rehashing and invalidation of all
pointers to
buckets. The function then proceeds with using the potentially invalid
InsertPos, leading to use-after-free.

The issue goes back to https://github.com/llvm/llvm-project/pull/157662.

I didn't manage to produce a reasonably-sized test case yet.



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