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]
Message-ID: <20250908120831.135419-1-i.abramov@mt-integration.ru>
Date: Mon, 8 Sep 2025 15:08:31 +0300
From: Ivan Abramov <i.abramov@...integration.ru>
To: Alasdair Kergon <agk@...hat.com>
CC: Ivan Abramov <i.abramov@...integration.ru>, Mike Snitzer
	<snitzer@...nel.org>, Mikulas Patocka <mpatocka@...hat.com>,
	<dm-devel@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
	<lvc-project@...uxtesting.org>
Subject: [PATCH 1/1] dm-integrity: Remove unreachable code in dm_integrity_ctr()

Since bi->metadata_size is an unsigned char, it's not practically
possible for it to be > PAGE_SIZE / 2.

Thus, remove the corresponding if statement.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Ivan Abramov <i.abramov@...integration.ru>
---
 drivers/md/dm-integrity.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index efeee0a873c0..b7ad7a5adb56 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -4752,11 +4752,6 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv
 			ti->error = "The integrity profile is smaller than tag size";
 			goto bad;
 		}
-		if ((unsigned long)bi->metadata_size > PAGE_SIZE / 2) {
-			r = -EINVAL;
-			ti->error = "Too big tuple size";
-			goto bad;
-		}
 		ic->tuple_size = bi->metadata_size;
 		if (1 << bi->interval_exp != ic->sectors_per_block << SECTOR_SHIFT) {
 			r = -EINVAL;
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ