tools/xenstore: fix XSA-417 patch
PATCH 1/1 tools/xenstore: fix XSA-417 patch
The fix for XSA-417 had a bug: domain_alloc_permrefs() will not return a negative value in case of an error, but a plain errno value.
Note this is not considered to be a security issue, as the only case where domain_alloc_permrefs() will return an error is a failed memory allocation. As a guest should not be able to drive Xenstore out of memory, this is NOT a problem a guest can trigger at will.
--- tools/xenstore/xenstored_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/xenstore/xenstored_core.c +1 -1
@@ -1784,7 +1784,7 @@ static int do_set_perms(const void *ctx, struct connection *conn,if (!xenstore_strings_to_perms (perms.p, perms.num, permstr))return errno; -if (domain_alloc_permrefs (&perms) <0 ) +if (domain_alloc_permrefs (&perms))return ENOMEM ;if (perms.p[0 ].perms &XS_PERM_IGNORE )return ENOENT ;
Signature · 1 line
2.35.3
Hi Juergen,
Quoted 10 lines · Juergen Gross
The fix for XSA-417 had a bug:
domain_alloc_permrefs()will not return a negative value in case of an error, but a plain errno value.Note this is not considered to be a security issue, as the only case where
domain_alloc_permrefs()will return an error is a failed memory allocation. As a guest should not be able to drive Xenstore out of memory, this is NOT a problem a guest can trigger at will.Fixes ab128218225d ("tools/xenstore: fix checking node permissions")Signed-off-by Juergen Gross <[email protected]>
Cheers,
Signature · 1 line
Julien Grall
Quoted 9 lines · Julien Grall
Quoted 8 lines · Juergen Gross
The fix for XSA-417 had a bug:
domain_alloc_permrefs()will not return a negative value in case of an error, but a plain errno value.Note this is not considered to be a security issue, as the only case where
domain_alloc_permrefs()will return an error is a failed memory allocation. As a guest should not be able to drive Xenstore out of memory, this is NOT a problem a guest can trigger at will.
Quoted 4 lines
Quoted 2 lines
Fixes ab128218225d ("tools/xenstore: fix checking node permissions")Signed-off-by Juergen Gross <[email protected]>Acked-by Julien Grall <[email protected]>
In the interest of not missing to add this to my to-be-backported collection, I've included this in what I've committed just now. It correcting an earlier XSA fix, I guess we may want to go as far as backporting this also to the security-only stable trees (i.e. through to 4.14 rather than just back to 4.16)?
As an aside - note that 4.14 is about to close.
Jan