From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: Christopher Friesen <cfriesen@nortel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
davem@davemloft.net
Subject: Re: netlink nlmsg_pid supposed to be pid or tid?
Date: Tue, 22 Nov 2005 01:49:13 +0300 [thread overview]
Message-ID: <20051121224913.GA31287@ms2.inr.ac.ru> (raw)
In-Reply-To: <4382406D.1040508@nortel.com>
Hello!
> TIPC wants the user to fill in the pid to use in the nlmsghdr portion of
> a particular message.
It is wrong. netlink_pid used not to be associated with process pids.
Kernel used pid just as a seed to calculate a random value to bind,
when user did not bind explicitly. It is equal to current->pid occasionally.
F.e. libnetlink from iproute autobinds and gets netlink_pid with
getsockname().
When user binds the socket himself, he was free to bind to any value,
including pid and tgid.
Actually, I remember one discussion. Herbert, wait a minute...
That's it: February 2005, Subject: [PATCH] Add audit uid to netlink credentials
We decided (or not?) that binding to anything but tgid and pid
must be prohibited by security reasons. Apaprently, the finding was lost.
Alexey
next prev parent reply other threads:[~2005-11-21 22:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 19:32 netlink nlmsg_pid supposed to be pid or tid? Christopher Friesen
2005-11-21 19:46 ` Christopher Friesen
2005-11-21 20:51 ` Herbert Xu
2005-11-21 21:35 ` Alexey Kuznetsov
2005-11-21 21:47 ` Christopher Friesen
2005-11-21 22:15 ` Herbert Xu
2005-11-21 22:51 ` Christopher Friesen
2005-11-22 0:09 ` Herbert Xu
2005-11-21 22:49 ` Alexey Kuznetsov [this message]
2005-11-21 23:34 ` Herbert Xu
2005-11-21 22:16 ` [NETLINK]: Use tgid instead of pid for nlmsg_pid Herbert Xu
2005-11-22 22:43 ` David S. Miller
2005-11-23 0:03 ` Herbert Xu
2005-11-23 6:18 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051121224913.GA31287@ms2.inr.ac.ru \
--to=kuznet@ms2.inr.ac.ru \
--cc=cfriesen@nortel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).