lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1290529928.5359.19.camel@sifl>
Date:	Tue, 23 Nov 2010 11:32:08 -0500
From:	Paul Moore <paul.moore@...com>
To:	Eric Paris <eparis@...hat.com>
Cc:	netdev@...r.kernel.org, selinux@...ho.nsa.gov, sds@...ho.nsa.gov,
	davem@...emloft.net
Subject: Re: [PATCH 2/2] SELinux: indicate fatal error in compat netfilter
 code

On Tue, 2010-11-23 at 11:28 -0500, Eric Paris wrote:
> The SELinux ip postroute code indicates when policy rejected a packet and
> passes the error back up the stack.  The compat code does not.  This patch
> sends the same kind of error back up the stack in the compat code.
> 
> Based-on-patch-by: Paul Moore <paul.moore@...com>
> Signed-off-by: Eric Paris <eparis@...hat.com>

Reviewed-by: Paul Moore <paul.moore@...com>

> ---
> 
>  security/selinux/hooks.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index bd6dc16..dd1690f 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -4529,11 +4529,11 @@ static unsigned int selinux_ip_postroute_compat(struct sk_buff *skb,
>  	if (selinux_secmark_enabled())
>  		if (avc_has_perm(sksec->sid, skb->secmark,
>  				 SECCLASS_PACKET, PACKET__SEND, &ad))
> -			return NF_DROP;
> +			return NF_DROP_ERR(-ECONNREFUSED);
>  
>  	if (selinux_policycap_netpeer)
>  		if (selinux_xfrm_postroute_last(sksec->sid, skb, &ad, proto))
> -			return NF_DROP;
> +			return NF_DROP_ERR(-ECONNREFUSED);
>  
>  	return NF_ACCEPT;
>  }
> 

-- 
paul moore
linux @ hp


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ