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-next>] [day] [month] [year] [list]
Message-Id: <1351762616-2060-1-git-send-email-xtfeng@gmail.com>
Date:	Thu,  1 Nov 2012 17:36:55 +0800
From:	Xiaotian Feng <xtfeng@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Xiaotian Feng <xtfeng@...il.com>,
	Xiaotian Feng <dannyfeng@...cent.com>,
	Jeff Layton <jlayton@...hat.com>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH] swapfile: fix name leak in swapoff

there's a name leak introduced by commit 91a27b2, add the missing
putname.

Signed-off-by: Xiaotian Feng <dannyfeng@...cent.com>
Cc: Jeff Layton <jlayton@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>
---
 mm/swapfile.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/swapfile.c b/mm/swapfile.c
index 71cd288..459fe30 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1608,6 +1608,8 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
 out_dput:
 	filp_close(victim, NULL);
 out:
+	if (pathname && !IS_ERR(pathname))
+		putname(pathname);
 	return err;
 }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ