Skip to content

Commit

Permalink
seccomp: allow stat() for ubsan.
Browse files Browse the repository at this point in the history
We've had complaints about ubsan issues for years, but never got to the
bottom of them, or saw them ourselves in testing. For some reason (still
not understood) we've started to see this ourselves in T and downstream
branches. So for now, let's just punch that extra hole.

Longer term, ubsan should stop needing any of this, so once
https://reviews.llvm.org/D124212 is in an LTS NDK, we should be able to
get rid of this _and_ the existing sanitizer-related holes.

Bug: android/ndk#1298
Bug: http://b/229989971
Test: treehugger
Change-Id: Id42cb29c4e943c0080c0d34ce4e5d6d1b32da9e8
(cherry picked from commit a0745ce)
Merged-In: Id42cb29c4e943c0080c0d34ce4e5d6d1b32da9e8
  • Loading branch information
enh-google authored and minaripenguin committed Feb 6, 2023
1 parent 9b96351 commit 140fc30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc/SECCOMP_ALLOWLIST_COMMON.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ int seccomp:seccomp(unsigned int operation, unsigned int flags, void *args) all
int open:open(const char*, int, ...) arm,x86,x86_64
int stat64:stat64(const char*, struct stat64*) arm,x86
ssize_t readlink:readlink(const char*, char*, size_t) arm,x86,x86_64
# Needed by ubsan in T? (http://b/229989971)
int stat(const char*, struct stat*) arm,x86,x86_64

#
# Useful new syscalls which we don't yet use in bionic.
Expand Down

0 comments on commit 140fc30

Please sign in to comment.