[arm64] libmozjs24 crashes w/ 48-bit VA

Bug #1571017 reported by dann frazier
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Spidermonkey Javascript engine
Fix Released
Critical
mozjs (Debian)
Fix Released
Unknown
mozjs (Ubuntu)
New
High
Unassigned
Xenial
Won't Fix
High
Unassigned
Yakkety
Won't Fix
High
Unassigned
mozjs24 (Debian)
Fix Released
Unknown
mozjs24 (Ubuntu)
Fix Released
High
dann frazier
Xenial
Fix Released
High
dann frazier
Yakkety
Won't Fix
High
Unassigned

Bug Description

[Impact]
libmozjs24 does not support 48-bit virtual addresses on arm64. 48-bit virtual addresses are enabled in the Ubuntu 16.04 kernel (though not on the kernel used on the buildds). This causes applications to crash.

[Test Case]
= mozjs =
$ sudo apt install couchdb-bin
$ couchjs a.js
Segmentation fault

= mozjs24 =
$ cat a.js
print("hello")
$ js24 a.js
Segmentation fault

[Regression Risk]
The fix for mozjs24 is ifdef'd to only apply to arm64. Since arm64 is currently segfaulting with a very simple program, there's very little chance of making things worse.

dann frazier (dannf)
Changed in mozjs24 (Ubuntu):
importance: Critical → High
Changed in mozjs (Ubuntu):
importance: Undecided → High
Changed in mozjs:
importance: Unknown → Critical
status: Unknown → New
Changed in mozjs:
status: New → In Progress
Changed in mozjs:
status: In Progress → Fix Released
Jeremy Bícha (jbicha)
Changed in mozjs24 (Ubuntu):
status: Confirmed → Fix Released
tags: added: xenial yakkety
Changed in mozjs24 (Ubuntu Xenial):
importance: Undecided → High
status: New → Triaged
Changed in mozjs24 (Ubuntu Yakkety):
importance: Undecided → High
status: New → Triaged
Changed in mozjs (Ubuntu Xenial):
importance: Undecided → High
Changed in mozjs (Ubuntu Yakkety):
importance: Undecided → High
affects: mozjs (Debian) → mozjs24 (Debian)
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Dann, do you want to try the new mozjs24 24.2.0-5.1ubuntu1 in zesty? I don't have arm64 hardware.

Changed in mozjs (Debian):
status: Unknown → New
Changed in mozjs24 (Debian):
status: Unknown → Fix Released
Revision history for this message
dann frazier (dannf) wrote : Re: [Bug 1571017] Re: [arm64] libmozjs24 crashes w/ 48-bit VA

On Sun, Jan 8, 2017 at 4:36 PM, Jeremy Bicha <email address hidden> wrote:
> Dann, do you want to try the new mozjs24 24.2.0-5.1ubuntu1 in zesty? I
> don't have arm64 hardware.

Jeremy,
 I can confirm that the package builds fine. If I revert
manually-mmap-on-arm64-to-ensure-high-17-bits-are-clear.patch, the
problem resurfaces. Thanks!

  -dann

Changed in mozjs (Debian):
status: New → Fix Released
dann frazier (dannf)
Changed in mozjs24 (Ubuntu Yakkety):
status: Triaged → Won't Fix
Changed in mozjs (Ubuntu Xenial):
status: New → Won't Fix
Changed in mozjs (Ubuntu Yakkety):
status: New → Won't Fix
dann frazier (dannf)
description: updated
Changed in mozjs24 (Ubuntu Xenial):
status: Triaged → In Progress
assignee: nobody → dann frazier (dannf)
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello dann, or anyone else affected,

Accepted mozjs24 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mozjs24/24.2.0-3ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mozjs24 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
dann frazier (dannf) wrote :

ubuntu@alekhin:~$ cat > a.js
print("hello")
ubuntu@alekhin:~$ js24 a.js
Segmentation fault (core dumped)
ubuntu@alekhin:~$ sudo dpkg -i libmozjs-24-bin_24.2.0-3ubuntu2.1_arm64.deb
(Reading database ... 101897 files and directories currently installed.)
Preparing to unpack libmozjs-24-bin_24.2.0-3ubuntu2.1_arm64.deb ...
Unpacking libmozjs-24-bin (24.2.0-3ubuntu2.1) over (24.2.0-3ubuntu2) ...
Setting up libmozjs-24-bin (24.2.0-3ubuntu2.1) ...
ubuntu@alekhin:~$ js24 a.js
hello
ubuntu@alekhin:~$

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mozjs24 - 24.2.0-3ubuntu2.1

---------------
mozjs24 (24.2.0-3ubuntu2.1) xenial; urgency=medium

  * Manually mmap on arm64 to ensure high 17 bits are clear (LP: #1571017)
    Thanks to Zheng Xu.

 -- dann frazier <email address hidden> Thu, 26 Apr 2018 13:53:45 -0600

Changed in mozjs24 (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for mozjs24 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.