about summary refs log tree commit diff
path: root/libio/vtables.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* libio: Disable vtable validation in case of interposition [BZ #23313]Florian Weimer2018-06-261-0/+16
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* ld.so: Examine GLRO to detect inactive loader [BZ #20204]Florian Weimer2017-12-181-1/+2
| | | | | | | | | | | | GLRO (_rtld_global_ro) is read-only after initialization and can therefore not be patched at run time, unlike the hook table addresses and their contents, so this is a desirable hardening feature. The hooks are only needed if ld.so has not been initialized, and this happens only after static dlopen (dlmopen uses a single ld.so object across all namespaces). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* hurd: Fix PTR_{,DE}MANGLE callsSamuel Thibault2016-07-061-0/+2
| | | | | | | | | | | * libio/iofopncook.c (_IO_cookie_read, _IO_cookie_write, _IO_cookie_seek, _IO_cookie_close, _IO_old_cookie_seek) [!PTR_DEMANGLE]: Do not call PTR_DEMANGLE. (set_callbacks) [!PTR_MANGLE]: Do not call PTR_MANGLE. * libio/vtables.c (_IO_vtable_check) [!PTR_DEMANGLE]: Do not call PTR_DEMANGLE. * libio/libioP.h (IO_set_accept_foreign_vtables) [!PTR_MANGLE]: Do not call PTR_MANGLE.
* libio: Implement vtable verification [BZ #20191]Florian Weimer2016-06-231-0/+70
This commit puts all libio vtables in a dedicated, read-only ELF section, so that they are consecutive in memory. Before any indirect jump, the vtable pointer is checked against the section boundaries, and the process is terminated if the vtable pointer does not fall into the special ELF section. To enable backwards compatibility, a special flag variable (_IO_accept_foreign_vtables), protected by the pointer guard, avoids process termination if libio stream object constructor functions have been called earlier. Such constructor functions are called by the GCC 2.95 libstdc++ library, and this mechanism ensures compatibility with old binaries. Existing callers inside glibc of these functions are adjusted to call the original functions, not the wrappers which enable vtable compatiblity. The compatibility mechanism is used to enable passing FILE * objects across a static dlopen boundary, too.