[all-commits] [llvm/llvm-project] 559524: [scudo][standalone] Add chunk ownership function

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Tue Dec 3 08:32:49 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5595249e48ef83bae5f2e61c0190332534902051
      https://github.com/llvm/llvm-project/commit/5595249e48ef83bae5f2e61c0190332534902051
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/chunk.h
    M compiler-rt/lib/scudo/standalone/combined.h
    M compiler-rt/lib/scudo/standalone/tests/combined_test.cpp

  Log Message:
  -----------
  [scudo][standalone] Add chunk ownership function

Summary:
In order to be compliant with tcmalloc's extension ownership
determination function, we have to expose a function that will
say if a chunk was allocated by us.

As to whether or not this has security consequences: someone
able to call this function repeatedly could use it to determine
secrets (cookie) or craft a valid header. So this should not be
exposed directly to untrusted user input.

Add related tests.

Additionally clang-format caught a few things to change.

Reviewers: hctim, pcc, cferris, eugenis, vitalybuka

Subscribers: JDevlieghere, jfb, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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




More information about the All-commits mailing list