Skip to content

Parallel ADIOS1: Heap-Use-After Free#421

Merged
ax3l merged 1 commit intoopenPMD:devfrom
ax3l:fix-adiosMPIoptHeapUse
Jan 8, 2019
Merged

Parallel ADIOS1: Heap-Use-After Free#421
ax3l merged 1 commit intoopenPMD:devfrom
ax3l:fix-adiosMPIoptHeapUse

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Jan 7, 2019

When passing the parameters to the adios_select_method, c-pointer of a temporary c++ string was taken which results in a heap-use-after-free.

We saw this as sporadic occurring/missing meta-data file, e.g. #37 (comment) .

Also, change the default to create a meta-data file unless deactivated in performance tuning. Otherwise, too confusing for users to always run bpmeta (and not possible e.g. during our MPI benchmark that does a write-then-read).

Found with clang (6.0) and -fsantize=address plus exports:

export ASAN_OPTIONS=detect_stack_use_after_return=1:detect_leaks=0:check_initialization_order=true:strict_init_order=true:detect_stack_use_after_scope=1

Refs:
https://github.com/google/sanitizers/wiki/AddressSanitizer
https://github.com/google/sanitizers/wiki/AddressSanitizerExampleUseAfterReturn

When passing the parameters to the `adios_select_method`,
c-pointer of a temporary c++ string was taken which results in
a heap-use-after-free.

We saw this as sporadic occuring/missing meta-data file.

Also, change the default to create a meta-data file unless
deactivated in performance tuning. Otherwise, too confusing
for users to always run `bpmeta` (and not possible e.g. during
our MPI benchmark that does a write-then-read).

Found with clang (6.0) and `-fsantize=address` plus exports:
```
export ASAN_OPTIONS=detect_stack_use_after_return=1:detect_leaks=0:check_initialization_order=true:strict_init_order=true:detect_stack_use_after_scope=1
```

Refs:
https://github.com/google/sanitizers/wiki/AddressSanitizer
https://github.com/google/sanitizers/wiki/AddressSanitizerExampleUseAfterReturn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant