Linux:常规进程和特权进程之间的 mmap MAP_SHARED 可以吗?

发布于 2024-12-22 03:46:23 字数 158 浏览 4 评论 0原文

我希望在受限用户下运行的进程与守护程序共享 futex,该守护程序基本上是 root,会放弃一些权限。通常的 shm_open 和 mmap 等是否适用于以不同用户身份运行且具有不同权限的进程?如果有的话,有哪些具体的安全问题(以及如何缓解这些问题,也许是权限)?两个进程中哪一个创建 fd 有区别吗?

I want a process running under a restricted user to share a futex with a daemon that is basically root that drops some privileges. Does the usual shm_open and mmap etc. work with processes running as different users, and with different privileges? What specific security issues are there with this, if any (and how do I alleviate them, permissions perhaps)? Does it make a difference which of the two process creates the fd?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

向地狱狂奔 2024-12-29 03:46:23

如果进程 shm_open("xx",O_CREAT|O_RDWR, 0666);它是 rw-rw-rw- 并向所有人开放。应应用常规 umask。

If processes shm_open("xx",O_CREAT|O_RDWR, 0666); it is rw-rw-rw- and open to all. The regular umask should apply.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文