Tuxtux' lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
petsoi@discuss.tchncs.de to Linux@discuss.tchncs.de · 2 years ago

On the Usefulness of SO_PEERPIDFD - swick's blog

blog.sebastianwick.net

external-link
message-square
0
link
fedilink
1
external-link

On the Usefulness of SO_PEERPIDFD - swick's blog

blog.sebastianwick.net

petsoi@discuss.tchncs.de to Linux@discuss.tchncs.de · 2 years ago
message-square
0
link
fedilink
On the Usefulness of SO_PEERPIDFD
blog.sebastianwick.net
external-link
Update Oct. 2025: Things have changed since writing this. In a follow-up post I explain how SO_PEERPIDFD Gets More Useful. Kernel 6.5 added a few new pidfd functions: SCM_PIDFD and SO_PEERPIDFD. The idea behind them is the same as SCM_CREDENTIALS and SO_PEERCRED respectively. The only difference is that the PIDFD functions return not a plain, numerical PID but a file descriptor instead. A plain PID is small number of type pid_t that is incremented for each new process and wraps over when too many processes have been created. This PID is usually used to look up some information about the process via files in /proc/$PID. While a process is looking up some information, it is possible that the process that PID initially referred to has terminated and a new process with this PID has been created. The looked up information is now incorrect, possibly resulting in a security vulnerability.
alert-triangle
You must log in or register to comment.

Linux@discuss.tchncs.de

linux@discuss.tchncs.de

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@discuss.tchncs.de

Everything about Linux

RULES

  • Be nice to each other.

  • No memes or pictures of Linux in the wild.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 34 users / week
  • 34 users / month
  • 34 users / 6 months
  • 1 local subscriber
  • 2.17K subscribers
  • 50 Posts
  • 0 Comments
  • Modlog
  • mods:
  • Fryboyter@discuss.tchncs.de
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org