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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Aug 2014 11:47:20 +0900
From:	Daeseok Youn <daeseok.youn@...il.com>
To:	akpm@...ux-foundation.org
Cc:	oleg@...hat.com, ebiederm@...ssion.com, eparis@...hat.com,
	rgb@...hat.com, tixxdz@...ndz.org, adobriyan@...il.com,
	bill.c.roberts@...il.com, linux-kernel@...r.kernel.org
Subject: [PATCH] proc: potential ERR_PTR dereference on proc_fill_cache()

The d_hash_and_lookup() returns NULL or ERR_PTR on lookup
failure.

Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>
---
 fs/proc/base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index f50d4be..49bc09c 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1673,7 +1673,7 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx,
 	ino_t ino;
 
 	child = d_hash_and_lookup(dir, &qname);
-	if (!child) {
+	if (IS_ERR_OR_NULL(child)) {
 		child = d_alloc(dir, &qname);
 		if (!child)
 			goto end_instantiate;
-- 
1.7.1

--
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