public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/27124] New: libio vtable hardening bypass via obstack files
@ 2020-12-28 23:15 willcoster at gmail dot com
  2022-04-26  9:18 ` [Bug stdio/27124] " fweimer at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: willcoster at gmail dot com @ 2020-12-28 23:15 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27124

            Bug ID: 27124
           Summary: libio vtable hardening bypass via obstack files
           Product: glibc
           Version: 2.32
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: willcoster at gmail dot com
  Target Milestone: ---

It is possible to bypass existing libio vtable hardening by using the
_IO_obstack_jumps vtable and a forged obstack.

The obstack struct contains unmangled pointers to a custom allocator [1] which
is used when growing an obstack [2, 3, 4].

Both of the methods listed in the _IO_obstack_jumps vtable attempt to grow an
obstack when certain conditions are met [5, 6].

This is similar to Bug 23236 and would allow an attacker with the ability to
corrupt FILE objects to gain code execution. I have tested and confirmed that
this works on glibc 2.32.

I am filing this in the public tracker in accordance with the guidance that
hardening bypasses are not considered security issues in and of themselves [7].

[1]
https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/obstack.h;h=4b1ba80047b378fa63739e5dbbbf748ca026e197;hb=refs/heads/release/2.32/master#l153
[2]
https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/obstack.h;h=4b1ba80047b378fa63739e5dbbbf748ca026e197;hb=refs/heads/release/2.32/master#l296
[3]
https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/obstack.c;h=0d652be9f5d4c0e88e55bf84bbc1053c20d7ce83;hb=refs/heads/release/2.32/master#l261
[4]
https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/obstack.c;h=0d652be9f5d4c0e88e55bf84bbc1053c20d7ce83;hb=refs/heads/release/2.32/master#l121
[5]
https://sourceware.org/git/?p=glibc.git;a=blob;f=libio/obprintf.c;h=e440cd74c3caf3ee5bbfec9aa1e3ff880f0b3fb7;hb=refs/heads/release/2.32/master#l48
[6]
https://sourceware.org/git/?p=glibc.git;a=blob;f=libio/obprintf.c;h=e440cd74c3caf3ee5bbfec9aa1e3ff880f0b3fb7;hb=refs/heads/release/2.32/master#l76
[7]
https://sourceware.org/glibc/wiki/Security%20Exceptions#Post-exploitation_countermeasures

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-05  8:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 23:15 [Bug stdio/27124] New: libio vtable hardening bypass via obstack files willcoster at gmail dot com
2022-04-26  9:18 ` [Bug stdio/27124] " fweimer at redhat dot com
2022-12-19 18:56 ` cvs-commit at gcc dot gnu.org
2023-07-05  8:30 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).