Comment 0 for bug 1964426

Revision history for this message
Luis Héctor Chávez (luisreplit) wrote :

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 > repro.sh <<EOF
#!/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=/tmp/lower,upperdir=/tmp/upper,workdir=/tmp/work
cp $(which cat) /tmp/overlay
/tmp/overlay/cat /proc/self/maps | grep '\/tmp\/overlay\/cat'
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-5.13.0-1019-gcp 5.13.0-1019.23~20.04.1
ProcVersionSignature: Ubuntu 5.13.0-1019.23~20.04.1-gcp 5.13.19
Uname: Linux 5.13.0-1019-gcp x86_64
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Mar 10 01:49:37 2022
ProcEnviron:
 TERM=alacritty
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-signed-gcp-5.13
UpgradeStatus: No upgrade log present (probably fresh install)