Bionic (4.15.0-43.46), x86: mprotect(..., PROT_NONE) failure for VM_PFNMAP VMAs (fixed in mainline)

Bug #1813179 reported by Christian Priebe
This bug report is a duplicate of:  Bug #1799237: mprotect fails on ext4 with dax. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Version:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

Ubuntu 4.15.0-43.46-generic 4.15.18

This is a bug that has been fixed in mainline. When calling 'mprotect(..., PROT_NONE)' on a virtual memory area with VM_PFNMAP set it fails with a EACCESS (Permission denied) error even though it is a valid call. In my particular case this happens when calling mprotect(..., PROT_NONE) on a set of pages within the range of an Intel SGX enclave.

The bug is fully described on the Linux kernel mailing list here: https://lkml.org/lkml/2018/8/16/697

The bug has been fixed in mainline in August, see https://github.com/torvalds/linux/commit/f19f5c49bbc3ffcc9126cc245fc1b24cc29f4a37

According to https://launchpad.net/ubuntu/+source/linux/+changelog the patch has been backported to Xenial and Cosmic, but not yet to Bionic.

Tags: bionic
Revision history for this message
Christian Priebe (cpriebe) wrote :
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1813179

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: bionic
Revision history for this message
Christian Priebe (cpriebe) wrote :

I don't believe log files are required in this case. Changing bug status to 'Confirmed'.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Christian Priebe (cpriebe) wrote :

I had previously missed this bug report on the same issue:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1799237

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.