Bug 25203 - Disable libio vtable validation for interposed pre-2.1 stdio handles
Summary: Disable libio vtable validation for interposed pre-2.1 stdio handles
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: stdio (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: 2.31
Assignee: Florian Weimer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-18 13:29 UTC by onuratacik
Modified: 2020-07-08 16:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2019-11-18 00:00:00
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description onuratacik 2019-11-18 13:29:01 UTC
Hello,

I have CentOS Linux release 7.7.1908 (Core)

and 2.17 glibc for x86_64 and i686

I got error which is Fatal error: glibc detected an invalid stdio handle when I start my counter strike dedicated server and it doesnt start.

Can you help me and tell me what I need to do please?

Thank you,
Have a good work.
Comment 1 Florian Weimer 2019-11-18 13:47:51 UTC
What is your exact glibc version? We fixed some incompatibilities in glibc-2.17-292.el7. Upstream, the fix landed as the fix for bug 23313:

commit c402355dfa7807b8e0adb27c009135a7e2b9f1b0
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Jun 26 10:24:52 2018 +0200

    libio: Disable vtable validation in case of interposition [BZ #23313]

I have not been able to get access to the binaries you mentioned, so I don't know if the fix applies to them as well.
Comment 2 onuratacik 2019-11-18 14:36:12 UTC
I use 2.17-292 and I dont know how to update glibc and disable vtable validation.

Can you please help me?

Thank you,
Have a good work.
Comment 3 Florian Weimer 2019-11-18 14:39:30 UTC
The expectation is that the fixed glibc disables the validation automatically if it detects and old binary. There is no manual step involved. Apparently, this is not working for your programs.

Are the program binaries you use publicly available from somewhere? Thanks.
Comment 4 onuratacik 2019-11-18 17:16:52 UTC
I used my counter strike 1.5 dedicated server for 10 years and I try to use them on my centos 7 but server doesnt start.

What can I do?
Comment 5 Florian Weimer 2019-11-18 17:18:25 UTC
(In reply to onuratacik from comment #4)
> I used my counter strike 1.5 dedicated server for 10 years and I try to use
> them on my centos 7 but server doesnt start.
> 
> What can I do?

Are these programs publicly available? Thanks.
Comment 6 onuratacik 2019-11-18 17:25:32 UTC
https://v5.steamlessproject.nl/index.php?page=stepbystepserver#linux

You can download same files with link.
Comment 7 onuratacik 2019-11-20 21:24:25 UTC
I hope you are looking fix for me! I will be really happy.
Comment 8 Florian Weimer 2019-11-22 21:52:09 UTC
The issue affects certain binaries (mostly written in C++) linked against glibc versions before 2.1. I posted a patch:

  libio: Disable vtable validation for pre-2.1 interposed handles [BZ #25203]
  https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/699
Comment 9 onuratacik 2019-11-23 20:59:33 UTC
How can I patch that? Can you please help me.
Comment 10 Florian Weimer 2019-11-25 12:51:47 UTC
(In reply to onuratacik from comment #9)
> How can I patch that? Can you please help me.

I think you need to take this part to the CentOS support forums.
Comment 11 Sourceware Commits 2019-11-27 19:19:27 UTC
The master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cb61630ed712d033f54295f776967532d3f4b46a

commit cb61630ed712d033f54295f776967532d3f4b46a
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Nov 22 22:10:42 2019 +0100

    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
Comment 12 Florian Weimer 2019-11-27 19:20:40 UTC
Fixed for glibc 2.31.
Comment 13 Sourceware Commits 2019-11-28 13:40:25 UTC
The release/2.30/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5a08bdb1e73e87afc1ada7b7b95d43ae470ce7e1

commit 5a08bdb1e73e87afc1ada7b7b95d43ae470ce7e1
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Nov 28 14:18:12 2019 +0100

    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
    (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
Comment 14 Sourceware Commits 2019-11-28 13:41:11 UTC
The release/2.29/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=44a61d4589880be014c5c5c522b6afba8d63625b

commit 44a61d4589880be014c5c5c522b6afba8d63625b
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Nov 28 14:17:27 2019 +0100

    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
    (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
Comment 15 Sourceware Commits 2019-11-28 14:14:09 UTC
The release/2.28/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f55e312bcd6582b5ff68fdcc1781c7017796dc91

commit f55e312bcd6582b5ff68fdcc1781c7017796dc91
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Nov 28 14:42:11 2019 +0100

    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
    (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
Comment 16 Sourceware Commits 2019-11-28 14:14:23 UTC
The release/2.27/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bef0b1cb31bed76a355776154af9191ed1758222

commit bef0b1cb31bed76a355776154af9191ed1758222
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Nov 28 14:42:32 2019 +0100

    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
    (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
Comment 17 Sourceware Commits 2019-11-28 14:14:38 UTC
The release/2.26/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2dc2d678e91f3f093d0f4855ac086efb288a5e23

commit 2dc2d678e91f3f093d0f4855ac086efb288a5e23
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Nov 28 14:44:48 2019 +0100

    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
    (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
Comment 18 Sourceware Commits 2019-11-28 16:46:17 UTC
The release/2.24/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0d7f1ed30969886c8dde62fbf7d2c79967d4bace

commit 0d7f1ed30969886c8dde62fbf7d2c79967d4bace
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Nov 22 22:10:42 2019 +0100

    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
    (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
Comment 19 Sourceware Commits 2019-11-28 16:49:34 UTC
The release/2.25/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a0408ec51ea862dda102482036c401d2e707e20b

commit a0408ec51ea862dda102482036c401d2e707e20b
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Nov 22 22:10:42 2019 +0100

    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
    (cherry picked from commit cb61630ed712d033f54295f776967532d3f4b46a)
Comment 20 onuratacik 2019-12-04 23:20:33 UTC
Hello, I did everything but it gives same error. Can you please check for me?