Narrow an engine thread's capabilities on runc, not only the serving thread's

Đang mở
#27 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, linux

Hướng nghiên cứu

Read the runc initialization and serving paths around fz_init and fz_serve, then trace where cap_nested_userns writes its sysctl and which thread performs the capability change. Compare the two options in the issue, including their effects on engine templates that start threads early. Done means choosing and implementing a safe capability policy, with coverage for the affected thread and runc behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

On runc, the zygote narrows its capabilities to CAP_SYS_ADMIN on the serving thread only. Capabilities are per thread, and the library installs no signal handler to broadcast the change. So an engine thread a template starts before fz_serve keeps the container's full set. No fiber inherits it, because every fiber forks from the serving thread.

Options.

  • Drop the capabilities in fz_init, before any thread exists. Then cap_nested_userns's sysctl write, which needs CAP_SYS_RESOURCE, must move there too.
  • Refuse to serve while another thread holds more than CAP_SYS_ADMIN. That breaks runc engine templates that start their thread early.
Ngôn ngữ chính
Go
Star
5
Fork
5
Merge trung bình
15 giờ 27 phút
Pull request đã merge (30 ngày)
41

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/fiberd

Tất cả issue của Azure/fiberd

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.