xorg fails to start if linked with -Bsymbolic-functions

Bug #230460 reported by StefanPotyra
6
Affects Status Importance Assigned to Milestone
libxfont (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

version: 1:1.3.2-1ubuntu1

See the corresponding bug 226156.

StefanPotyra (sistpoty)
Changed in libxfont:
status: New → Confirmed
Revision history for this message
StefanPotyra (sistpoty) wrote :

Ok, after some tests, here's the answer to what -Bsymbolic-functions does:

Let's assume libxfont1 defines a function
extern void foo(void);
and also uses this function.

With -Bsymbolic-functions, the call inside libxfont1 will always resolve to the function located in libxfont1.
Without the linker option, it's possible for a program (or library) linking against libxfont1 to override foo(), by specifying an own version of it. Then the call inside libxfont1 will get resolved to the version defined in the program instead.

Revision history for this message
StefanPotyra (sistpoty) wrote :

Hm... as I've written a little script right now (attached), which checks everything that links directly to libxfont1 for duplicate function symbols, there don't appear to be any (or the script is buggy). What I haven't done yet is to check indirect users of libxfont1 though.

Also, I guess it's possible that s.th. libxfont1 links against might override a function defined in libxfont1.

Revision history for this message
StefanPotyra (sistpoty) wrote :

hm... maybe it wasn't a too good ideas to filter out non-weak functions:
candidate symbols so far (not filtered on functions only):

Duplicate symbols in /usr/bin/Xorg
-----------------------
 ClientSignal
 CopyISOLatin1Lowered
 DeleteFontClientID
 ErrorF
 FatalError
 FontModuleList
 GetClientResolutions
 GetDefaultPointSize
 GetNewFontClientID
 GetTimeInMillis
 MakeAtom
 NameForAtom
 RegisterFPEFunctions
 StoreFontClientFont
 ValidAtom
 Xalloc
 Xcalloc
 Xfree
 Xrealloc
 __bss_start
 _edata
 _end
 client_auth_generation
 find_old_font
 in6addr_any
 init_fs_handlers
 remove_fs_handlers
 serverClient
 serverGeneration
 set_font_authorizations
-----------------------

Revision history for this message
StefanPotyra (sistpoty) wrote :

just for the record, src/stubs of libxfont contains a number of function definitions as weak functions, with only a dummy implementation. Looks like it's a design decision to me, and hence not a bug. I'll leave it to people more into X to decide if it's done on purpose though ;).

Revision history for this message
StefanPotyra (sistpoty) wrote :

as from my last comment: it can't be linked with -Bsymbolic-functions by design. -> won't fix.

Changed in libxfont:
status: Confirmed → Won't Fix
Revision history for this message
StefanPotyra (sistpoty) wrote :

(untagging as security issue, it doesn't provide a security problem per se)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments