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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_8FCF968DD725F80DE712085DC4DDAD993B07@qq.com>
Date: Sat, 23 Dec 2023 11:47:39 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+f987ceaddc6bcc334cde@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [ntfs3?] WARNING: kmalloc bug in ntfs_load_attr_list

please test WARNING: kmalloc bug in ntfs_load_attr_list

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9a6b294ab496

diff --git a/fs/ntfs3/attrlist.c b/fs/ntfs3/attrlist.c
index 7c01735d1219..e631ecc1b9df 100644
--- a/fs/ntfs3/attrlist.c
+++ b/fs/ntfs3/attrlist.c
@@ -53,7 +53,7 @@ int ntfs_load_attr_list(struct ntfs_inode *ni, struct ATTRIB *attr)
 	if (!attr->non_res) {
 		lsize = le32_to_cpu(attr->res.data_size);
 		/* attr is resident: lsize < record_size (1K or 4K) */
-		le = kvmalloc(al_aligned(lsize), GFP_KERNEL);
+		le = kvmalloc(al_aligned(lsize), GFP_KERNEL | __GFP_NOWARN);
 		if (!le) {
 			err = -ENOMEM;
 			goto out;
@@ -91,7 +91,7 @@ int ntfs_load_attr_list(struct ntfs_inode *ni, struct ATTRIB *attr)
 		 * the result is 16M bytes per attribute list.
 		 * Use kvmalloc to allocate in range [several Kbytes - dozen Mbytes]
 		 */
-		le = kvmalloc(al_aligned(lsize), GFP_KERNEL);
+		le = kvmalloc(al_aligned(lsize), GFP_KERNEL | __GFP_NOWARN);
 		if (!le) {
 			err = -ENOMEM;
 			goto out;
diff --git a/fs/ntfs3/bitmap.c b/fs/ntfs3/bitmap.c
index 63f14a0232f6..49e660be9a0f 100644
--- a/fs/ntfs3/bitmap.c
+++ b/fs/ntfs3/bitmap.c
@@ -660,7 +660,7 @@ int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits)
 		wnd->bits_last = wbits;
 
 	wnd->free_bits =
-		kvmalloc_array(wnd->nwnd, sizeof(u16), GFP_KERNEL | __GFP_ZERO);
+		kvmalloc_array(wnd->nwnd, sizeof(u16), GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN);
 
 	if (!wnd->free_bits)
 		return -ENOMEM;
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 9153dffde950..87778834aa9c 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -1413,7 +1413,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
 	}
 
 	bytes = inode->i_size;
-	sbi->def_table = t = kvmalloc(bytes, GFP_KERNEL);
+	sbi->def_table = t = kvmalloc(bytes, GFP_KERNEL | __GFP_NOWARN);
 	if (!t) {
 		err = -ENOMEM;
 		goto put_inode_out;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ