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: <20191016120556.32664-1-hslester96@gmail.com>
Date:   Wed, 16 Oct 2019 20:05:56 +0800
From:   Chuhong Yuan <hslester96@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Chuhong Yuan <hslester96@...il.com>
Subject: [PATCH 1/2] hfs: add a check for hfs_bnode_find

hfs_brec_update_parent misses a check for hfs_bnode_find and may miss
the failure.
Add a check for it like what is done in again.

Signed-off-by: Chuhong Yuan <hslester96@...il.com>
---
 fs/hfs/brec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/hfs/brec.c b/fs/hfs/brec.c
index 896396554bcc..e6af05a4cd1b 100644
--- a/fs/hfs/brec.c
+++ b/fs/hfs/brec.c
@@ -430,6 +430,8 @@ static int hfs_brec_update_parent(struct hfs_find_data *fd)
 			new_node->parent = tree->root;
 		}
 		fd->bnode = hfs_bnode_find(tree, new_node->parent);
+		if (IS_ERR(fd->bnode))
+			return PTR_ERR(fd->bnode);
 		/* create index key and entry */
 		hfs_bnode_read_key(new_node, fd->search_key, 14);
 		cnid = cpu_to_be32(new_node->this);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ