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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <24141926-4b17-4d8c-229a-5a4de18346ed@schaufler-ca.com>
Date:	Wed, 8 Jun 2016 13:55:14 -0700
From:	Casey Schaufler <casey@...aufler-ca.com>
To:	Rafal Krypa <r.krypa@...sung.com>
Cc:	linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org, Kidong Kim <kd0228.kim@...sung.com>,
	Tomasz ƚwierczek <t.swierczek@...sung.com>
Subject: Re: [PATCH] Smack: ignore null signal in smack_task_kill

On 4/4/2016 2:14 AM, Rafal Krypa wrote:
> Kill with signal number 0 is commonly used for checking PID existence.
> Smack treated such cases like any other kills, although no signal is
> actually delivered when sig == 0.
>
> Checking permissions when sig == 0 didn't prevent an unprivileged caller
> from learning whether PID exists or not. When it existed, kernel returned
> EPERM, when it didn't - ESRCH. The only effect of policy check in such
> case is noise in audit logs.
>
> This change lets Smack silently ignore kill() invocations with sig == 0.
>
> Signed-off-by: Rafal Krypa <r.krypa@...sung.com>

Acked-by: Casey Schaufler <casey@...aufler-ca.com>

Applied to git://github.com/cschaufler/smack-next.git#smack-for-4.8

> ---
>  security/smack/smack_lsm.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index 11f7901..3d9bbed 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -2227,6 +2227,9 @@ static int smack_task_kill(struct task_struct *p, struct siginfo *info,
>  	struct smack_known *tkp = smk_of_task_struct(p);
>  	int rc;
>  
> +	if (!sig)
> +		return 0; /* null signal; existence test */
> +
>  	smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK);
>  	smk_ad_setfield_u_tsk(&ad, p);
>  	/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ