[all-commits] [llvm/llvm-project] a4e8d8: [GWP-ASan] Only pack frames that are stored.

Mitch Phillips via All-commits all-commits at lists.llvm.org
Tue Mar 24 14:37:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a4e8d89704d2584d5c56cb27745beab25c7b9b36
      https://github.com/llvm/llvm-project/commit/a4e8d89704d2584d5c56cb27745beab25c7b9b36
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2020-03-24 (Tue, 24 Mar 2020)

  Changed paths:
    M compiler-rt/lib/gwp_asan/common.cpp
    M compiler-rt/lib/gwp_asan/tests/backtrace.cpp

  Log Message:
  -----------
  [GWP-ASan] Only pack frames that are stored.

Summary:
Backtrace() returns the number of frames that are *available*, rather
than the number of frames stored. When we pack, we supply the number of
frames we have stored. The number of available frames can exceed the
number of stored frames, leading to stack OOB read.

Fix up this problem.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: #sanitizers, morehouse, cferris, pcc

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D76722




More information about the All-commits mailing list