Display Name
Display Name

Reputation: 2403

Linux: mmap MAP_SHARED between regular and privileged process OK?

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?

Upvotes: 2

Views: 426

Answers (1)

Ken Cheung
Ken Cheung

Reputation: 1808

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

Upvotes: 2

Related Questions