Changes to overlay lowerdir produce kernel file-caps error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Triaged
|
Medium
|
Unassigned | ||
Artful |
Won't Fix
|
Medium
|
Unassigned | ||
Bionic |
Triaged
|
Medium
|
Unassigned |
Bug Description
In 4.13+ kernels, if you replace an executable file on the lowerdir of an Overlay union (such that its inode changes), the system will no longer allow you to execute the file via the upperdir. The changes introduced to the kernel in this commit...
https:/
... cause it to report a file security capabilities error.
---
Replication steps and result:
1. Set up an Overlay union containing some executable files. In my case i have an ext4 lowerdir and a tmpfs upperdir, but i don't think it matters.
2. Verify that executing some file (/bin/true for example) on the upperdir works.
3. Replace that file on the lowerdir using mv, rsync, or similar.
4. Attempt to execute the file on the upperdir again — it will fail. The shell will give either 126 or 127 as the return status.
5. Check the kernel log. A message like the following appears:
>kernel: Invalid argument reading file caps for /bin/true
I replicated this on Xenial using the HWE-edge kernel (4.13). The error does NOT occur on the HWE kernel (4.10).
---
NOTE: I am aware that the result of changing files on the lowerdir of an Overlay union, per the documentation, is undefined — so this is probably not a 'bug' per se. However, i wasn't sure it was deliberate, either, and it seemed like maybe the previous undefined behaviour was nicer than the new undefined behaviour, so i thought i'd report it anyway.
---
Config information:
Ubuntu release: 16.04.3 (Xenial)
Kernel package: linux-image-
Kernel version signature: Ubuntu 4.13.0-
tags: | added: kernel-da-key |
tags: | added: artful bionic |
Changed in linux (Ubuntu Artful): | |
status: | New → Triaged |
Changed in linux (Ubuntu Bionic): | |
status: | Confirmed → Triaged |
Changed in linux (Ubuntu Artful): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Bionic): | |
importance: | Undecided → Medium |
tags: | added: cscc |
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 1736808
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.