]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184)
authorEugene Teo <eteo@redhat.com>
Mon, 13 Apr 2009 02:04:41 +0000 (10:04 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 May 2009 22:45:02 +0000 (15:45 -0700)
Not upstream in 2.6.30, as the function was removed there, making this a
non-issue.

Node and port send checks can skip in the compat_net=1 case. This bug
was introduced in commit effad8d.

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Reported-by: Dan Carpenter <error27@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
security/selinux/hooks.c

index 00815973d4126492d596f278431c342bc7b6efc6..e210b212da7f2465150f98afff3d6b8840f12877 100644 (file)
@@ -4661,6 +4661,7 @@ static int selinux_ip_postroute_iptables_compat(struct sock *sk,
        if (err)
                return err;
        err = avc_has_perm(sk_sid, if_sid, SECCLASS_NETIF, netif_perm, ad);
+       if (err)
                return err;
 
        err = sel_netnode_sid(addrp, family, &node_sid);