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] [day] [month] [year] [list]
Message-ID: <e0117644-3bed-5374-6697-3fa2734b379d@canonical.com>
Date:   Fri, 23 Mar 2018 17:23:14 -0700
From:   John Johansen <john.johansen@...onical.com>
To:     Colin King <colin.king@...onical.com>,
        James Morris <jmorris@...ei.org>,
        "Serge E . Hallyn" <serge@...lyn.com>,
        linux-security-module@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] apparmor: fix error returns checks by making size a
 ssize_t

On 03/23/2018 04:34 PM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently variable size is a unsigned size_t, hence comparisons to
> see if it is less than zero (for error checking) will always be
> false.  Fix this by making size a ssize_t
> 
> Detected by CoverityScan, CID#1466080 ("Unsigned compared against 0")
> 
> Fixes: 8e51f9087f40 ("apparmor: Add support for attaching profiles via xattr, presence and value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
Acked-by: John Johansen <john.johansen@...onical.com>

and pulled into apparmor-next

> ---
>  security/apparmor/domain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
> index 57cc892e05a2..590b7e8cd21c 100644
> --- a/security/apparmor/domain.c
> +++ b/security/apparmor/domain.c
> @@ -314,7 +314,7 @@ static int aa_xattrs_match(const struct linux_binprm *bprm,
>  			   struct aa_profile *profile, unsigned int state)
>  {
>  	int i;
> -	size_t size;
> +	ssize_t size;
>  	struct dentry *d;
>  	char *value = NULL;
>  	int value_size = 0, ret = profile->xattr_count;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ