Linux:常规进程和特权进程之间的 mmap MAP_SHARED 可以吗?
我希望在受限用户下运行的进程与守护程序共享 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果进程 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.