refactoring of overlayfs fix to properly support shiftfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
linux-hwe-5.17 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Jammy |
Fix Committed
|
Medium
|
Unassigned | ||
Kinetic |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Starting with 5.13 we've incorrectly dropped the following sauce patch:
UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files
This patch is required to use overlayfs on top of shiftfs and without this patch we may break containers that rely on shiftfs (using zfs/ceph as storage pool w/ shiftfs enabled).
However, we made this patch dependent on AUFS, starting with Jammy we're not enabling AUFS anymore, so this fix becomes a no-op.
So we need to re-introduce this fix with a bit of refactoring to not depend on AUFS.
[Test case]
The following script can be used to trigger the issue:
#!/bin/bash
cat > test.py << EOF
import sys
f = open("/
for l in f.readlines():
if "python" not in l:
continue
print(l)
s = l.split()
start, end = s[0].split("-")
fname = s[-1]
print(start, end, fname)
break
else:
sys.exit(1)
test_file1 = open(fname)
test_file2 = open("/
fdinfo1 = open("/
fdinfo2 = open("/
if fdinfo1 != fdinfo2:
print("FAIL")
print(
print(fdinfo1)
print(
print(fdinfo2)
sys.exit(1)
print("PASS")
EOF
sudo docker run -it --privileged --rm -v `pwd`:/mnt python python /mnt/test.py
[Fix]
Import the right pieces from AUFS to properly support the fix and get
rid of the AUFS dependency across all our kernels and re-apply the
overlayfs fix without the AUFS dependency.
[Regression potential]
This patch is touching overlayfs, so we may see potential regressions in overlayfs, especially when containers are used.
CVE References
no longer affects: | linux (Ubuntu Focal) |
summary: |
- refactoring of overlayfs fix to report the right mnt_id of files opened - from map_files + refactoring of overlayfs fix to properly support shiftfs |
description: | updated |
Changed in linux (Ubuntu Jammy): | |
status: | Incomplete → In Progress |
Changed in linux (Ubuntu Kinetic): | |
status: | Incomplete → In Progress |
Changed in linux-hwe-5.17 (Ubuntu Kinetic): | |
status: | New → Invalid |
Changed in linux (Ubuntu Kinetic): | |
status: | In Progress → Fix Committed |
Changed in linux-hwe-5.17 (Ubuntu Jammy): | |
status: | New → In Progress |
status: | In Progress → Fix Committed |
Changed in linux-hwe-5.17 (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Jammy): | |
importance: | Undecided → Medium |
status: | In Progress → Fix Committed |
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 1983640
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.