diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-26 10:58:29 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-27 09:45:23 +0200 |
commit | 6bebe833a2fd65c4d42e3870317a4c6b4c7299ad (patch) | |
tree | 9a09b0a9076e925b72914d63f8f36f7295d89cf6 /sapi/phpdbg/phpdbg_utils.c | |
parent | 2079b09854ba1b7990641450ab9a69a141f7718a (diff) | |
download | php-git-6bebe833a2fd65c4d42e3870317a4c6b4c7299ad.tar.gz |
Fix use-after-free in stream freeing during shutdown
Streams will be freed in an unpredictable order during shutdown.
Ignore explicit calls to php_stream_close() entirely to avoid
use-after-free -- instead let the stream resource destructor
deal with it. We have to account for a few special cases:
* Enclosed streams should be freed, as the resource destructor
will forward to the enclosing stream.
* Stream cookies also directly free streams, because we delegate
to the cookie destruction if one exists.
* Mysqlnd also directly frees streams, because it explicitly
removes stream resources (because mysqlnd!)
Diffstat (limited to 'sapi/phpdbg/phpdbg_utils.c')
0 files changed, 0 insertions, 0 deletions