Bug 23518 - Eliminate __libc_utmp_jump_table
Summary: Eliminate __libc_utmp_jump_table
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.28
: P3 normal
Target Milestone: 2.31
Assignee: Florian Weimer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-13 12:04 UTC by Florian Weimer
Modified: 2020-01-17 14:01 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2018-08-13 12:04:31 UTC
There is only a single file-based backend, so that the dispatching through function pointers is unnecessary.

In addition, this eliminates a bunch of non-mangled function pointers, so it s minor security hardening.
Comment 1 Sourceware Commits 2019-08-05 13:56:11 UTC
The master branch has been updated by Florian Weimer <fw@sourceware.org>:

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

commit 1a7fe2ebe52b3c8bf465d1756e69452d05c1c103
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Aug 5 15:54:10 2019 +0200

    login: Remove utmp backend jump tables [BZ #23518]
    
    There is just one file-based implementation, so this dispatch
    mechanism is unnecessary.  Instead of the vtable pointer
    __libc_utmp_jump_table, use a non-negative file_fd as the indicator
    that the backend is initialized.
Comment 2 Florian Weimer 2019-08-05 13:59:02 UTC
Fixed for glibc 2.31.
Comment 3 Sourceware Commits 2020-01-17 14:01:56 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=b90aefd4ac44e9353d45170282c01f0bfdeeaf1c

commit b90aefd4ac44e9353d45170282c01f0bfdeeaf1c
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Aug 5 15:54:10 2019 +0200

    login: Remove utmp backend jump tables [BZ #23518]
    
    There is just one file-based implementation, so this dispatch
    mechanism is unnecessary.  Instead of the vtable pointer
    __libc_utmp_jump_table, use a non-negative file_fd as the indicator
    that the backend is initialized.
    
    (cherry picked from commit 1a7fe2ebe52b3c8bf465d1756e69452d05c1c103)