procfs and sysfs

Several files under /proc/sys and /sys are usermode-helper paths or triggers: the host kernel reads them and runs the referenced program as root in the host namespaces, or exposes host memory. When a container has the real host procfs or sysfs mounted writable, writing core_pattern, modprobe, or uevent_helper, or reading kcore, leads straight to the host.

1 ನಿಮಿಷದ ಓದುಅಕ್ಟೋ 7,2026 ರಂದು ನವೀಕರಿಸಲಾಗಿದೆflorianamette1 ಕೊಡುಗೆದಾರ
ನಿಮ್ಮ ಸಹಾಯಕವನ್ನು ಕೇಳಿ (MCP)GitHub ನಲ್ಲಿ ಸಂಪಾದಿಸಿ

/proc and /sys are not ordinary files: many entries are control points the kernel reads back and acts on. A handful name a program the kernel runs, as root in the host's init namespaces, when some event occurs: a crash (core_pattern), an auto-load of a kernel module (modprobe), or a device uevent (uevent_helper). Others expose host memory directly (kcore) or let a process poke the host kernel (sysrq-trigger). These are escapes only when the container has the host's real procfs or sysfs mounted and writable, which happens with a careless -v /proc:/host/proc, a procfs remount, or a privileged container.

Check what is exposed and writable:

bash
mount | grep -E 'proc|sys'                       # look for host proc/sys without "ro"
ls -l /proc/sys/kernel/core_pattern /proc/sys/kernel/modprobe 2>/dev/null
ls -l /sys/kernel/uevent_helper 2>/dev/null
for f in /proc/sys/kernel/core_pattern /proc/sys/kernel/modprobe /sys/kernel/uevent_helper; do
  [ -w "$f" ] && echo "writable: $f"; done

Subtopics#

References#