aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-06-01 10:41:03 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-06-01 10:41:03 +0200
commit4e8a6346cd3da2d88bbad745a1769260d36f2783 (patch)
treedcf9deeedd5263469fa425574c0ac671a8b43c2a /ChangeLog
parent50d004c91c942221b862a4a13a4b5f78cfb0d595 (diff)
downloadglibc-4e8a6346cd3da2d88bbad745a1769260d36f2783.tar.xz
glibc-4e8a6346cd3da2d88bbad745a1769260d36f2783.zip
libio: Avoid _allocate_buffer, _free_buffer function pointers [BZ #23236]
These unmangled function pointers reside on the heap and could be targeted by exploit writers, effectively bypassing libio vtable validation. Instead, we ignore these pointers and always call malloc or free. In theory, this is a backwards-incompatible change, but using the global heap instead of the user-supplied callback functions should have little application impact. (The old libstdc++ implementation exposed this functionality via a public, undocumented constructor in its strstreambuf class.)
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog24
1 files changed, 24 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 74588dac11..1b5b27ce4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2018-06-01 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #23236]
+ * libio/strfile.h (struct _IO_str_fields): Rename members to
+ discourage their use and add comment.
+ (_IO_STR_DYNAMIC): Remove unused macro.
+ * libio/strops.c (_IO_str_init_static_internal): Do not use
+ callback pointers. Call malloc and free.
+ (_IO_str_overflow): Do not use callback pointers. Call malloc
+ and free.
+ (enlarge_userbuf): Likewise.
+ (_IO_str_finish): Call free.
+ * libio/wstrops.c (_IO_wstr_init_static): Initialize
+ _allocate_buffer_unused.
+ (_IO_wstr_overflow): Do not use callback pointers. Call malloc
+ and free.
+ (enlarge_userbuf): Likewise.
+ (_IO_wstr_finish): Call free.
+ * debug/vasprintf_chk.c (__vasprintf_chk): Initialize
+ _allocate_buffer_unused, _free_buffer_unused.
+ * libio/memstream.c (__open_memstream): Likewise.
+ * libio/vasprintf.c (_IO_vasprintf): Likewise.
+ * libio/wmemstream.c (open_wmemstream): Likewise.
+
2018-05-30 Paul Pluzhnikov <ppluzhnikov@google.com>
* sysdeps/x86_64/fpu/libm-test-ulps (log_vlen8_avx2): Update for