当前位置:   article > 正文

k8s默认seccomp禁用研究_禁用 seccomp

禁用 seccomp

CVE-2022-0185 in Linux Kernel Can Allow Container Escape in s

  1. root@ubutest2:/# pscap -a
  2. ppid pid name command capabilities
  3. 0 1 root bash chown, dac_override, fowner, fsetid, kill, setgid, setuid, setpcap, net_bind_service, net_raw, sys_chroot, mknod, audit_write, setfcap
  1. root@ubutest2:/# unshare -r
  2. # pscap -a
  3. ppid pid name command capabilities
  4. 0 1 root bash chown, dac_override, fowner, fsetid, kill, setgid, setuid, setpcap, net_bind_service, net_raw, sys_chroot, mknod, audit_write, setfcap
  5. 1 270 root sh full

实践

通过下面命令启动一个容器

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: hello-apparmor
  5. annotations:
  6. # Tell Kubernetes to apply the AppArmor profile "k8s-apparmor-example-deny-write".
  7. # Note that this is ignored if the Kubernetes node is not running version 1.4 or greater.
  8. container.apparmor.security.beta.kubernetes.io/hello: unconfined
  9. spec:
  10. containers:
  11. - name: hello
  12. image: busybox:1.28
  13. command: [ "sh", "-c", "echo 'Hello AppArmor!' && sleep 1h" ]

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/461360
推荐阅读
相关标签
  

闽ICP备14008679号