Bug 18924 - More helpful warning message for ELF symbol size discrepancies
Summary: More helpful warning message for ELF symbol size discrepancies
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.23
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-04 19:17 UTC by Florian Weimer
Modified: 2015-09-04 19:22 UTC (History)
0 users

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 2015-09-04 19:17:55 UTC
We currently use this warning (at least on x86_64):

%s: Symbol `%s' has different size in shared object, consider re-linking\n";

This evidently does not do its job because people (including, until today, me) think it's harmless:

https://bugzilla.mozilla.org/show_bug.cgi?id=496993#c1
https://lists.fedoraproject.org/pipermail/devel/2015-September/214128.html

In reality, the symbol value is truncated to the short of both options.  This can lead to overruns as a result of an incorrect sizeof value or a missing sentinel at the end of an array.

A reworded warning message should make this clearer.  It's probably too late now to refuse to start such broken programs.
Comment 1 Florian Weimer 2015-09-04 19:22:17 UTC
Related Mozilla NSS bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1201900