Eric Dumazet | 21 Aug 2012 18:21
Picon

[PATCH] af_netlink: force credentials passing [CVE-2012-3520]

From: Eric Dumazet <edumazet <at> google.com>

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 <at> google.com>
Cc: Petr Matousek <pmatouse <at> redhat.com>
Cc: Florian Weimer <fweimer <at> redhat.com>
Cc: Pablo Neira Ayuso <pablo <at> netfilter.org>
---
 include/net/scm.h        |    4 +++-
 net/netlink/af_netlink.c |    2 +-
(Continue reading)

David Miller | 21 Aug 2012 23:53
Favicon

Re: [PATCH] af_netlink: force credentials passing [CVE-2012-3520]

From: Eric Dumazet <eric.dumazet <at> gmail.com>
Date: Tue, 21 Aug 2012 18:21:17 +0200

> From: Eric Dumazet <edumazet <at> google.com>
> 
> 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 <at> google.com>

Applied and queued up for -stable, thanks Eric.
(Continue reading)


Gmane