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]
Date:   Tue,  8 Aug 2023 10:04:05 +0530
From:   Manas Ghandat <ghandatmanas@...il.com>
To:     anton@...era.com, linkinjeon@...nel.org
Cc:     Manas Ghandat <ghandatmanas@...il.com>,
        linux-ntfs-dev@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org,
        Linux-kernel-mentees@...ts.linuxfoundation.org,
        syzbot+4768a8f039aa677897d0@...kaller.appspotmail.com
Subject: [PATCH] ntfs : fix shift-out-of-bounds in ntfs_iget

Added a check to the compression_unit so that out of bound doesn't
occur.

Signed-off-by: Manas Ghandat <ghandatmanas@...il.com>
Reported-by: syzbot+4768a8f039aa677897d0@...kaller.appspotmail.com
---
 fs/ntfs/inode.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 6c3f38d66579..2ee100a7df32 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -1077,6 +1077,17 @@ static int ntfs_read_locked_inode(struct inode *vi)
 					goto unm_err_out;
 				}
 				if (a->data.non_resident.compression_unit) {
+					if(a->data.non_resident.compression_unit + 
+						vol->cluster_size_bits > 32) {
+							ntfs_error(vi->i_sb, "Found "
+								"non-standard "
+								"compression unit (%u).   "
+								"Cannot handle this.",
+								a->data.non_resident.
+								compression_unit);
+							err = -EOPNOTSUPP;
+							goto unm_err_out;
+						}
 					ni->itype.compressed.block_size = 1U <<
 							(a->data.non_resident.
 							compression_unit +
-- 
2.37.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ