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>] [day] [month] [year] [list]
Message-Id: <1382380366-26540-1-git-send-email-geyslan@gmail.com>
Date:	Mon, 21 Oct 2013 15:32:46 -0300
From:	"Geyslan G. Bem" <geyslan@...il.com>
To:	kernel-br@...glegroups.com
Cc:	"Geyslan G. Bem" <geyslan@...il.com>, Ben Myers <bpm@....com>,
	Alex Elder <elder@...nel.org>,
	xfs@....sgi.com (supporter:XFS FILESYSTEM),
	linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] xfs: fix possible NULL dereference

This patch puts a 'break' in the true branch, avoiding the 'icptr->ic_next'
dereferencing.

Signed-off-by: Geyslan G. Bem <geyslan@...il.com>
---
 fs/xfs/xfs_log.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index a2dea108..8cdeb7e 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -3703,8 +3703,10 @@ xlog_verify_iclog(
 	spin_lock(&log->l_icloglock);
 	icptr = log->l_iclog;
 	for (i=0; i < log->l_iclog_bufs; i++) {
-		if (icptr == NULL)
+		if (!icptr) {
 			xfs_emerg(log->l_mp, "%s: invalid ptr", __func__);
+			break;
+		}
 		icptr = icptr->ic_next;
 	}
 	if (icptr != log->l_iclog)
-- 
1.8.4

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