diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-05-20 21:54:57 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-05-20 21:54:57 +0200 |
commit | 09e1b0e3f6facc1af2dbcfef204f0aaa8718772b (patch) | |
tree | 18056a8f7177511eff47519d176c310901f5e455 /ChangeLog | |
parent | 75c51570c710aa9c6df6b7a1e131392e1408c63f (diff) | |
download | glibc-09e1b0e3f6facc1af2dbcfef204f0aaa8718772b.tar glibc-09e1b0e3f6facc1af2dbcfef204f0aaa8718772b.tar.gz glibc-09e1b0e3f6facc1af2dbcfef204f0aaa8718772b.tar.bz2 glibc-09e1b0e3f6facc1af2dbcfef204f0aaa8718772b.zip |
libio: Remove codecvt vtable [BZ #24588]
The codecvt vtable is not a real vtable because it also contains the
conversion state data. Furthermore, wide stream support was added to
GCC 3.0, after a C++ ABI bump, so there is no compatibility
requirement with libstdc++.
This change removes several unmangled function pointers which could
be used with a corrupted FILE object to redirect execution. (libio
vtable verification did not cover the codecvt vtable.)
Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -1,5 +1,48 @@ 2019-05-20 Florian Weimer <fweimer@redhat.com> + [BZ #24588] + libio: Remove codecvt vtable. + * libio/fileops.c ( _IO_new_file_fopen): Do not copy + __libio_codecvt. + * libio/iofgetpos.c (_IO_new_fgetpos): Call + __libio_codecvt_encoding. + * libio/iofgetpos64.c (_IO_new_fgetpos): Likewise. + * libio/iofsetpos.c (_IO_new_fsetpos): Likewise. + * libio/iofsetpos64.c (_IO_new_fsetpos): Likewise. + * libio/iofwide.c (__libio_codecvt): Remove variable. + (_IO_fwide): Do not copy __libio_codecvt. + (__libio_codecvt_out): Rename from do_out and export. + (do_unshift): Remove function. + (__libio_codecvt_in): Rename from do_in and export. + (__libio_codecvt_encoding): Rename from do_encoding and export. + (do_always_noconv): Remove function. + (__libio_codecvt_length): Rename from do_length and export. + (do_max_length): Remove function. + * libio/libio.h (enum __codecvt_result): Remove definition; moved + to libioP.h. + (struct _IO_codecvt): Remove fields __codecvt_destr, + __codecvt_do_out, __codecvt_do_unshift, __codecvt_do_in, + __codecvt_do_encoding, __codecvt_do_always_noconv, + __codecvt_do_length, __codecvt_do_max_length. + * libio/libioP.h (enum __codecvt_result): Define; moved from + libio.h. + (__libio_codecvt_out, __libio_codecvt_in) + (__libio_codecvt_encoding, __libio_codecvt_length): Declare + functions. + * libio/wfileops.c (_IO_wdo_write): Call __libio_codecvt_out. + (_IO_wfile_underflow): Call __libio_codecvt_in. + (_IO_wfile_underflow): Likewise. + (_IO_wfile_underflow_mmap): Likewise. + (_IO_wfile_sync): Call __libio_codecvt_encoding, + __libio_codecvt_length. + (adjust_wide_data): Call __libio_codecvt_encoding, + __libio_codecvt_in. + (do_ftell_wide): Call __libio_codecvt_length, __libio_codecvt_out. + (_IO_wfile_seekoff): Call __libio_codecvt_encoding, + __libio_codecvt_length. + +2019-05-20 Florian Weimer <fweimer@redhat.com> + * support/support.h (support_sbindir_prefix): Declare. (support_install_rootsbindir): Update comment. * support/Makefile (CFLAGS-support_paths.c): Define SBINDIR_PATH. |