Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu-testsuite.12243
0187-9pfs-fix-bogus-fd-check-in-local_re.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0187-9pfs-fix-bogus-fd-check-in-local_re.patch of Package qemu-testsuite.12243
From f2fdb51f1c492729ee1a71dc17c72df689ad531e Mon Sep 17 00:00:00 2001 From: Greg Kurz <groug@kaod.org> Date: Mon, 6 Mar 2017 17:34:01 +0100 Subject: [PATCH] 9pfs: fix bogus fd check in local_remove() This was spotted by Coverity as a fd leak. This is certainly true, but also local_remove() would always return without doing anything, unless the fd is zero, which is very unlikely. (Coverity issue CID1371732) Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Eric Blake <eblake@redhat.com> (cherry picked from commit b7361d46e75f12d8d943ca8d33ef82cafce39920) [BR: Fix and/or infrastructure for BSC#1020427 CVE-2016-9602] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/9pfs/9p-local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 2b1016032f..2d60644745 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1007,7 +1007,7 @@ static int local_remove(FsContext *ctx, const char *path) int err = -1; dirfd = local_opendir_nofollow(ctx, dirpath); - if (dirfd) { + if (dirfd == -1) { goto out; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor