diff options
author | Eric Dumazet <edumazet@google.com> | 2012-08-21 06:21:17 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-21 14:53:01 -0700 |
commit | e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea (patch) | |
tree | d3a95cc25dd504fecc807dbb8a9e9c3501c90edf /net/netlink | |
parent | a9915a1b52df52ad87f3b33422da95cf25372f09 (diff) | |
download | op-kernel-dev-e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea.zip op-kernel-dev-e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea.tar.gz |
af_netlink: force credentials passing [CVE-2012-3520]
Pablo Neira Ayuso discovered that avahi and
potentially NetworkManager accept spoofed Netlink messages because of a
kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data
to the receiver if the sender did not provide such data, instead of not
including any such data at all or including the correct data from the
peer (as it is the case with AF_UNIX).
This bug was introduced in commit 16e572626961
(af_unix: dont send SCM_CREDENTIALS by default)
This patch forces passing credentials for netlink, as
before the regression.
Another fix would be to not add SCM_CREDENTIALS in
netlink messages if not provided by the sender, but it
might break some programs.
With help from Florian Weimer & Petr Matousek
This issue is designated as CVE-2012-3520
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Petr Matousek <pmatouse@redhat.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 5463969..1445d73 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1362,7 +1362,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock, if (NULL == siocb->scm) siocb->scm = &scm; - err = scm_send(sock, msg, siocb->scm); + err = scm_send(sock, msg, siocb->scm, true); if (err < 0) return err; |