Wrong path reported in /proc/self/maps with overlayfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-signed-gcp-5.13 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When a program is running in an overlayfs, /proc/self/maps reports the wrong path. Notably, it lacks a prefix equal to the mountpoint of the overlayfs. This only happens on linux-gcp-5.13, it does not reproduce on non-gcp kernels.
Small repro:
cat << "EOF" > repro.sh
#!/usr/bin/env bash
mkdir -p /tmp/overlay
mkdir -p /tmp/work
mkdir -p /tmp/upper
mkdir -p /tmp/lower
mount -t overlay overlay /tmp/overlay -o lowerdir=
cp $(which cat) /tmp/overlay
/tmp/overlay/cat /proc/self/maps | grep '\/tmp\
if [ $? -ne 0 ]; then
echo 'Bug!'
else
echo 'No bug!'
fi
umount /tmp/overlay
EOF
sudo bash repro.sh
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.13.0-1019-gcp x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Thu Mar 10 01:49:37 2022
ProcEnviron:
TERM=alacritty
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: linux-signed-
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.