From: Eugene Teo Date: Mon, 13 Apr 2009 02:04:41 +0000 (+0800) Subject: unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184) X-Git-Tag: v2.6.29.3~40 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=841825d424ea902c3e960db0d061586d769a7fce;p=karo-tx-linux.git unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184) 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 Reported-by: Dan Carpenter Acked-by: James Morris Acked-by: Paul Moore Signed-off-by: Greg Kroah-Hartman --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 00815973d412..e210b212da7f 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -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);