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: <20220719170118.3296447-1-Liam.Howlett@oracle.com>
Date:   Tue, 19 Jul 2022 17:01:30 +0000
From:   Liam Howlett <liam.howlett@...cle.com>
To:     "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yu Zhao <yuzhao@...gle.com>, Hugh Dickins <hughd@...gle.com>,
        Sven Schnelle <svens@...ux.ibm.com>
Subject: [PATCH] maple_tree: Fix mas_empty_area() wrapping

Set the error code correctly when at the left most node and search has
been exhausted.  This was an overflow bug.

Reported-by: Sven Schnelle <svens@...ux.ibm.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
---
 lib/maple_tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 1b8130f19c2e..0c0bda979693 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -4994,7 +4994,7 @@ static inline bool mas_anode_descend(struct ma_state *mas, unsigned long size)
 		}
 next_slot:
 		min = pivot + 1;
-		if (mas->last < min) {
+		if (mas->last <= pivot) {
 			mas_set_err(mas, -EBUSY);
 			return true;
 		}
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ