Skip to content

Instantly share code, notes, and snippets.

@thestinger
Last active September 18, 2020 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thestinger/11e00e6c7549fb8029cadf08535b5cf7 to your computer and use it in GitHub Desktop.
Save thestinger/11e00e6c7549fb8029cadf08535b5cf7 to your computer and use it in GitHub Desktop.

Bionic CTS status for GrapheneOS

failures caused by broken tests uncovered by hardened_malloc that are skipped with hwasan:

  • malloc#memalign_multiple: hardened_malloc returns an error on non-power-of-two to catch bugs
  • malloc#memalign_non_power2: hardened_malloc returns an error on non-power-of-two to catch bugs
  • malloc#mallopt_decay: hardened_malloc doesn't support this and returns an error
  • malloc_iterate#invalid_pointers: debugging feature not supported by hardened_malloc
  • malloc_iterate#large_allocs: debugging feature not supported by hardened_malloc
  • malloc_iterate#small_allocs: debugging feature not supported by hardened_malloc

other failures caused by broken tests uncovered by hardened_malloc:

  • malloc#realloc_0: realloc with zero size is non-portable and deprecated by the c standard. bionic tests expect it to free the allocation, which is inconsistent with zero size malloc and leads to use-after-free bugs. hardened_malloc chooses the lesser evil of memory leaks for code that depends on it doing a free.
  • android_mallopt#set_allocation_limit_realloc_free - same as malloc#realloc_0
  • stdlib#aligned_alloc_size_not_multiple_of_alignment: the requirement for the aligned_alloc size to be a multiple of the alignment was misguided and was removed as the resolution to defect report 460 which became part of c18
  • stack_protector_DeathTest#modify_stack_protector overwrites the first byte of the canary with zero to cause a failure, which has a 1/256 of not actually causing a failure with the stock OS and it always fails on 64-bit with GrapheneOS due to setting the leading byte to NUL

other intentional failures:

  • unistd#syscall_long: the test uses sbrk via libc which is disabled in grapheneos since using it outside libc is a bug
  • unistd_nofortify#syscall_long: same as unistd#syscall_long
  • dlext#ns_anonymous: depends on dynamic in-memory code execution which GrapheneOS disables for the base OS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment