aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-11-22 22:10:42 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-28 16:22:07 +0100
commit0d7f1ed30969886c8dde62fbf7d2c79967d4bace (patch)
tree73fce848582cf87248406f7f6cc6ba85bcf989ce
parent1154cb63e725a579def2d7ba8383fd950931342b (diff)
downloadglibc-release/2.24/master.zip
glibc-release/2.24/master.tar.gz
glibc-release/2.24/master.tar.bz2
libio: Disable vtable validation for pre-2.1 interposed handles [BZ #25203]release/2.24/master
Commit c402355dfa7807b8e0adb27c009135a7e2b9f1b0 ("libio: Disable vtable validation in case of interposition [BZ #23313]") only covered the interposable glibc 2.1 handles, in libio/stdfiles.c. The parallel code in libio/oldstdfiles.c needs similar detection logic. Fixes (again) commit db3476aff19b75c4fdefbe65fcd5f0a90588ba51 ("libio: Implement vtable verification [BZ #20191]"). Change-Id: Ief6f9f17e91d1f7263421c56a7dc018f4f595c21 (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
-rw-r--r--libio/oldstdfiles.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libio/oldstdfiles.c b/libio/oldstdfiles.c
index 609b7d9..c281d25 100644
--- a/libio/oldstdfiles.c
+++ b/libio/oldstdfiles.c
@@ -87,6 +87,11 @@ _IO_check_libio (void)
stdout->_vtable_offset = stderr->_vtable_offset =
((int) sizeof (struct _IO_FILE)
- (int) sizeof (struct _IO_FILE_complete));
+
+ if (_IO_stdin_.vtable != &_IO_old_file_jumps
+ || _IO_stdout_.vtable != &_IO_old_file_jumps
+ || _IO_stderr_.vtable != &_IO_old_file_jumps)
+ IO_set_accept_foreign_vtables (&_IO_vtable_check);
}
}