Skip to content

runc 1.3.3 fails in unprivileged Proxmox LXC with "permission denied" on sysctl #4972

@joshuafuller

Description

@joshuafuller

runc 1.3.3 fails in unprivileged Proxmox LXC with "permission denied" on sysctl

Description

After upgrading to runc 1.3.3-0ubuntu1~22.04.2, all Docker containers fail to start in unprivileged Proxmox LXC containers with nesting enabled. The error occurs when runc attempts to access /proc/sys/net/ipv4/ip_unprivileged_port_start through a detached procfs mount, which AppArmor interprets as accessing /sys/net/ipv4/ip_unprivileged_port_start and denies.

This appears to be related to CVE-2025-52881 and the security fix that introduced detached procfs mounts to prevent mount race attacks. The issue affects production systems running Docker in Proxmox LXC containers.

Error:

OCI runtime create failed: runc 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: unknown

Steps to reproduce the issue

  1. Create an unprivileged Proxmox LXC container with Ubuntu 22.04:

    pct create 114 local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst \
      --features nesting=1,keyctl=1 \
      --unprivileged 1 \
      --memory 2048 \
      --cores 4
  2. Install Docker inside the LXC container:

    apt-get update
    apt-get install -y docker.io docker-compose
  3. Upgrade runc to 1.3.3:

    apt-get update
    apt-get install runc=1.3.3-0ubuntu1~22.04.2
  4. Try to start any Docker container:

    docker run --rm hello-world

Describe the results you received and expected

Expected result:
Container starts successfully.

Actual result:

docker: Error response from daemon: failed to create task for container:
failed to create shim task: OCI runtime create failed: runc 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: unknown.

All containers fail with exit code 126 (permission denied).

Docker logs show:

failed to start container: failed to create task for container:
failed to create shim task: OCI runtime create failed: runc 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: unknown

What version of runc are you using?

Failing version:

runc version 1.3.3-0ubuntu1~22.04.2
spec: 1.2.1
go: go1.23.1
libseccomp: 2.5.3

Working version (after downgrade):

runc version 1.1.0-0ubuntu1
spec: 1.0.2-dev
go: go1.17.3
libseccomp: 2.5.3

Host OS information

PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian

Container Configuration:

  • Proxmox VE 8.2.2
  • Unprivileged LXC container
  • Features: nesting=1, keyctl=1
  • OS Type: ubuntu

Host kernel information

Linux TeslaMate 6.8.4-3-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.4-3 (2024-05-02T11:55Z) x86_64 x86_64 x86_64 GNU/Linux

Additional Information

Timeline of Issue

  • 2025-11-06 06:07 UTC: Ubuntu's unattended-upgrade automatically upgraded runc from 1.1.12 to 1.3.3
  • 2025-11-06 ~07:56 UTC: After LXC container restart, all Docker containers failed to start

Root Cause Analysis

The security fix in runc 1.3.3 uses detached procfs mounts to prevent mount race attacks. When runc tries to write to /proc/sys/net/ipv4/ip_unprivileged_port_start, AppArmor's path-based security model misinterprets the detached mount path as /sys/net/... which is blocked by Proxmox LXC's AppArmor profile.

Attempted Fixes (Unsuccessful)

  1. Modified AppArmor profile /etc/apparmor.d/abstractions/lxc/container-base:

    • Changed deny /sys/[^fdc]* to deny /sys/[^fdcn]* (to allow /sys/net)
    • Added explicit rule: /sys/net/** rw,
    • Added: /proc/sys/net/ipv4/ip_unprivileged_port_start w,
    • Reloaded profiles with apparmor_parser -r /etc/apparmor.d/lxc-containers
    • Result: Still failed with same error
  2. Set sysctl on host level:

    sysctl -w net.ipv4.ip_unprivileged_port_start=0
    • Result: Did not resolve the issue

Working Workaround

Downgrade to runc 1.1.0:

apt-get install -y --allow-downgrades runc=1.1.0-0ubuntu1
apt-mark hold runc

Note: This workaround loses the security fixes from runc 1.3.3 (including fixes for 3 container escape vulnerabilities).

Related Issues

This issue has been reported in multiple projects:

The Incus fix (PR #2624) modified AppArmor to allow /sys/net access, but this same fix doesn't appear to work in Proxmox LXC environments.

Impact

This affects all users running:

  • Docker in unprivileged Proxmox LXC containers with nesting
  • Any container runtime using runc 1.3.3 in similar environments
  • Production systems that receive automatic security updates

Questions

  1. Is the AppArmor fix approach the correct solution for Proxmox LXC?
  2. Should runc handle the AppArmor denial more gracefully?
  3. Is there a way to make runc skip this sysctl modification when it's already appropriately set at the host level?
  4. Should there be a runtime flag to disable this specific sysctl modification for nested container environments?

System Details

  • Docker: 27.5.1
  • containerd: 1.7.24
  • docker-init: 0.19.0
  • Proxmox VE: 8.2.2
  • LXC container: unprivileged with nesting=1, keyctl=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions