
Workaround for CVE-2025-52881: Fixes Docker/Podman breakage in Proxmox LXC containers caused by AppArmor incompatibility with runc 1.2.7+. Universal wrapper for community-scripts with automatic AppArmor configuration.
Workaround for CVE-2025-52881: Fixes Docker, Podman, and container runtime breakage in Proxmox LXC containers caused by AppArmor incompatibility with runc 1.2.7+/1.3.2+
Recent security updates to runc (versions 1.2.7+ and 1.3.2+) and containerd (1.7.28-2+) introduced a breaking incompatibility with AppArmor when running inside Proxmox LXC containers. This causes Docker and other container runtimes to fail with errors like:
OCI runtime create failed: unable to start container process:
error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file:
reopen fd 8: permission denied
This affects:
Reference: opencontainers/runc#4968
While downgrading runc below 1.2.7/1.3.2 would "fix" the issue, it exposes your system to actual privilege escalation vulnerabilities that the security update patched. The workaround in this repository is the recommended approach.
This repository provides tools that automatically apply and manage the AppArmor workaround for Proxmox LXC containers:
pve-script-wrapper.sh - Universal wrapper for Proxmox community scriptspve-docker-fix - Fix existing containers that are already brokenpve-docker-rollback - Remove the workaround when upstream fixes are availablepct-patched - Internal wrapper (used automatically by pve-script-wrapper.sh)The scripts automatically detect your container's OS and apply the appropriate AppArmor workaround:
For all containers:
lxc.apparmor.profile: unconfined
For Ubuntu containers only:
lxc.mount.entry: /dev/null sys/module/apparmor/parameters/enabled none bind 0 0
The first line disables AppArmor confinement (required for all distributions). The second line masks the AppArmor module detection and is only needed for Ubuntu containers - Debian containers typically work without it (runc#4968).
OS Auto-Detection: The scripts automatically detect whether your container is Ubuntu or Debian and apply only the necessary configuration lines.
On your Proxmox VE host, run:
# Download all scripts
curl -fsSL https://raw.githubusercontent.com/jq6l43d1/proxmox-lxc-docker-fix/main/pve-script-wrapper.sh -o /usr/local/bin/pve-script-wrapper.sh
curl -fsSL https://raw.githubusercontent.com/jq6l43d1/proxmox-lxc-docker-fix/main/pct-patched -o /usr/local/bin/pct-patched
curl -fsSL https://raw.githubusercontent.com/jq6l43d1/proxmox-lxc-docker-fix/main/pve-docker-fix -o /usr/local/bin/pve-docker-fix
curl -fsSL https://raw.githubusercontent.com/jq6l43d1/proxmox-lxc-docker-fix/main/pve-docker-rollback -o /usr/local/bin/pve-docker-rollback
# Make them executable
chmod +x /usr/local/bin/pve-script-wrapper.sh /usr/local/bin/pct-patched /usr/local/bin/pve-docker-fix /usr/local/bin/pve-docker-rollback
Or clone the repository:
git clone https://github.com/jq6l43d1/proxmox-lxc-docker-fix.git
cd proxmox-lxc-docker-fix
chmod +x *.sh pct-patched pve-docker-fix pve-docker-rollback
cp pve-script-wrapper.sh pct-patched pve-docker-fix pve-docker-rollback /usr/local/bin/
Instead of:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/komodo.sh)"
Use:
pve-script-wrapper.sh https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/komodo.sh
This works with any Proxmox community script that creates LXC containers:
# Docker
pve-script-wrapper.sh https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/docker.sh
# Dockge
pve-script-wrapper.sh https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/dockge.sh
# CasaOS
pve-script-wrapper.sh https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/casaos.sh
# Podman
pve-script-wrapper.sh https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/podman.sh
# And any other script that installs container runtimes
If you already have a broken container:
# Fix container 105
pve-docker-fix 105
# Fix without automatic restart
pve-docker-fix 105 --no-restart
The tool will:
If you prefer to apply the fix manually:
# Stop the container
pct stop 105
# Edit the config file
nano /etc/pve/lxc/105.conf
# Add this line at the end (required for all containers):
lxc.apparmor.profile: unconfined
# For Ubuntu containers, also add this line:
lxc.mount.entry: /dev/null sys/module/apparmor/parameters/enabled none bind 0 0
# Start the container
pct start 105
Note: Debian containers typically only need the first line. Ubuntu containers need both lines. See runc#4968 for technical details.
When upstream fixes are available (Proxmox/LXC/AppArmor updates), you can remove the workaround:
# List all containers with the workaround
pve-docker-rollback --list
# Remove from specific container
pve-docker-rollback 105
# Preview changes without modifying
pve-docker-rollback 105 --dry-run
# Remove from all containers at once
pve-docker-rollback --all
# Remove without restart (changes apply on next start)
pve-docker-rollback 105 --no-restart
# Remove from all containers without confirmation
pve-docker-rollback --all --force
The rollback tool will:
--force)When to rollback:
pct-patchedPATH to prioritize the wrapperpct commandpct create commands/usr/sbin/pct to create the container/etc/pve/lxc/$CTID.confpct commands unchangedlxc.apparmor.profile: unconfined# Verify scripts are executable
ls -l /usr/local/bin/pve-script-wrapper.sh /usr/local/bin/pct-patched
# Make them executable if needed
chmod +x /usr/local/bin/pve-script-wrapper.sh /usr/local/bin/pct-patched
# Verify the fix was applied
grep -i apparmor /etc/pve/lxc/105.conf
# Check detected OS type
pct config 105 | grep ostype
# For Ubuntu containers, ensure both lines are present:
# - lxc.apparmor.profile: unconfined
# - lxc.mount.entry: /dev/null sys/module/apparmor/parameters/enabled...
# If not present, apply manually
pve-docker-fix 105
# Check container is restarted
pct status 105
# Check for syntax errors in config
cat /etc/pve/lxc/105.conf
# View detailed error messages
journalctl -xe
Contributions welcome! Please:
GNU GENERAL PUBLIC LICENSE - See LICENSE file for details
# Install
curl -fsSL https://raw.githubusercontent.com/jq6l43d1/proxmox-lxc-docker-fix/main/install.sh | bash
# Run community script with fix
pve-script-wrapper.sh <script-url>
# Fix existing container
pve-docker-fix <container-id>
# List containers with workaround
pve-docker-rollback --list
# Remove workaround (when upstream fixes available)
pve-docker-rollback <container-id>
pve-docker-rollback --all
# Get help
pve-script-wrapper.sh --help
pve-docker-fix --help
pve-docker-rollback --help
Note: This is a temporary workaround until upstream projects release permanent fixes. Monitor the referenced GitHub issues for updates.