* [PATCH] apparmor: signedness bug in aa_xattrs_match()
@ 2018-03-19 10:34 Dan Carpenter
2018-03-24 0:42 ` John Johansen
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-03-19 10:34 UTC (permalink / raw)
To: linux-security-module
The "size" variable needs to be signed ssize_t so that the error
handling works correctly.
Fixes: 8e51f9087f40 ("apparmor: Add support for attaching profiles via xattr, presence and value")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] apparmor: signedness bug in aa_xattrs_match()
2018-03-19 10:34 [PATCH] apparmor: signedness bug in aa_xattrs_match() Dan Carpenter
@ 2018-03-24 0:42 ` John Johansen
0 siblings, 0 replies; 2+ messages in thread
From: John Johansen @ 2018-03-24 0:42 UTC (permalink / raw)
To: linux-security-module
On 03/19/2018 03:34 AM, Dan Carpenter wrote:
> The "size" variable needs to be signed ssize_t so that the error
> handling works correctly.
>
> Fixes: 8e51f9087f40 ("apparmor: Add support for attaching profiles via xattr, presence and value")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
yep thanks I have pulled this in to apparmor-next
> 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;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-24 0:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-19 10:34 [PATCH] apparmor: signedness bug in aa_xattrs_match() Dan Carpenter
2018-03-24 0:42 ` John Johansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).