This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[review] libio: Disable vtable validation for pre-2.1 interposed handles [BZ #...
- From: "Florian Weimer (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: libc-alpha at sourceware dot org
- Cc: Florian Weimer <fweimer at redhat dot com>
- Date: Fri, 22 Nov 2019 16:51:14 -0500
- Subject: [review] libio: Disable vtable validation for pre-2.1 interposed handles [BZ #...
- Auto-submitted: auto-generated
- References: <gerrit.1574459474000.Ief6f9f17e91d1f7263421c56a7dc018f4f595c21@gnutoolchain-gerrit.osci.io>
- Reply-to: fweimer at redhat dot com, fweimer at redhat dot com, libc-alpha at sourceware dot org
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/699
......................................................................
libio: Disable vtable validation for pre-2.1 interposed handles [BZ #25203]
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
---
M libio/oldstdfiles.c
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/libio/oldstdfiles.c b/libio/oldstdfiles.c
index bb1705b..95c041a 100644
--- a/libio/oldstdfiles.c
+++ b/libio/oldstdfiles.c
@@ -83,6 +83,11 @@
= 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);
}
}
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ief6f9f17e91d1f7263421c56a7dc018f4f595c21
Gerrit-Change-Number: 699
Gerrit-PatchSet: 1
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-MessageType: newchange