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: <20210508014251.1577-1-thunder.leizhen@huawei.com>
Date:   Sat, 8 May 2021 09:42:51 +0800
From:   Zhen Lei <thunder.leizhen@...wei.com>
To:     Al Viro <viro@...iv.linux.org.uk>,
        Russell King <rmk+kernel@...linux.org.uk>,
        linux-kernel <linux-kernel@...r.kernel.org>
CC:     Zhen Lei <thunder.leizhen@...wei.com>
Subject: [PATCH 1/1] fs/adfs: dir: fix error return code in adfs_fplus_read()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: d79288b4f61b ("fs/adfs: bigdir: calculate and validate directory checkbyte")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
---
 fs/adfs/dir_fplus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index 4a15924014da..a6fd847ce0eb 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -142,6 +142,7 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
 	}
 
 	if (adfs_fplus_checkbyte(dir) != t->bigdircheckbyte) {
+		ret = -EIO;
 		adfs_error(sb, "dir %06x checkbyte mismatch\n", indaddr);
 		goto out;
 	}
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ