The default bug view has changed. See this FAQ.

Don't load system libraries with their full path

RESOLVED FIXED in Firefox 11

Status

()

Firefox for Android
General
P3
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

unspecified
Firefox 12
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
One of the assumptions of the new linker (bug 683127) is that dlopen()ing a file by giving a full path is not used for system libraries. As dlopen() is only diverted for libraries the new linker loads itself, this makes things work for system libraries that dlopen with a full path, but it happens that contrary to what we do on desktop linux, it turns out we are dlopening with full paths for system libraries on android. There's really no reason that force us to do so, but it breaks the new linker assumptions.
(Assignee)

Comment 1

5 years ago
Created attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

Pushed to try. See rationale in comment 0. I also changed libEGL.so and libGLESv2.so on desktop linux, because they are not necessarily in /usr/lib (on debian they are in a multiarch directory), and they are actually not named libEGL.so and libGLESv2.so except in -devel packages.
http://tbpl.mozilla.org/?tree=Try&rev=f977c50be911

(will add some more people for review of the non gfx parts)
Attachment #587408 - Flags: review?(bjacob)
(Assignee)

Updated

5 years ago
Attachment #587408 - Flags: review?(blassey.bugs)
(Assignee)

Comment 2

5 years ago
Comment on attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

For dom/wifi parts.
Attachment #587408 - Flags: review?(gal)
Comment on attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

Review of attachment 587408 [details] [diff] [review]:
-----------------------------------------------------------------

r=me on the gfx parts
Attachment #587408 - Flags: review?(bjacob) → review+
Attachment #587408 - Flags: review?(blassey.bugs) → review+
(Assignee)

Updated

5 years ago
Assignee: nobody → mh+mozilla

Updated

5 years ago
Attachment #587408 - Flags: review?(gal) → review+
tracking-fennec: --- → 11+
Priority: -- → P3
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/065691d7581c
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/065691d7581c
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 12
why with full path removal, library names where changed?
basically on Maemo/N9, it fail to load libEGL.so.1, because that simply does not exists
Depends on: 719253
(Assignee)

Comment 7

5 years ago
(In reply to Oleg Romashin (:romaxa) from comment #6)
> why with full path removal, library names where changed?
> basically on Maemo/N9, it fail to load libEGL.so.1, because that simply does
> not exists

See comment 1. We could probably try .so.1 *and* .so on non-android.
(Assignee)

Comment 8

5 years ago
Created attachment 591509 [details] [diff] [review]
Avoid loading system libraries with their full path - for aurora

[Approval Request Comment]
This is a dependency of bug 683127.
For tier-1 platforms, this is mostly a no-op. Libraries are opened with dlopen and will be searched in the paths that were hardcoded previously. Except it will also now work when the libraries are in different system library paths.
It however causes bug 719253 on maemo.
Attachment #591509 - Flags: review+
Attachment #591509 - Flags: approval-mozilla-aurora?

Comment 9

5 years ago
Comment on attachment 591509 [details] [diff] [review]
Avoid loading system libraries with their full path - for aurora

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #591509 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Updated

5 years ago
Keywords: sec-review-needed
(Assignee)

Comment 10

5 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/9dbdd072eb4e
status-firefox11: --- → fixed
since this is android only we don't see a need to reivew, removing flag
Keywords: sec-review-needed
You need to log in before you can comment on or make changes to this bug.