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_27C9A8AECAEEFD8C8FA7E286C892D0865106@qq.com>
Date: Sun,  1 Sep 2024 19:52:27 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+8aa6090cbe3c97dc9565@...kaller.appspotmail.com
Cc: adilger.kernel@...ger.ca,
	jack@...e.cz,
	libaokun1@...wei.com,
	linux-ext4@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	ritesh.list@...il.com,
	syzkaller-bugs@...glegroups.com,
	tytso@....edu
Subject: Re: [syzbot] [ext4?] kernel BUG in ext4_inline_data_truncate

Use EXT4_INODE_HAS_XATTR_SPACE to check the existence of xattr space,
before clear the content in the xattr space

#syz test

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index e7a09a99837b..b568232ab871 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1946,7 +1946,8 @@ int ext4_inline_data_truncate(struct inode *inode, int *has_inline)
 			ext4_es_remove_extent(inode, 0, EXT_MAX_BLOCKS);
 
 		/* Clear the content in the xattr space. */
-		if (inline_size > EXT4_MIN_INLINE_DATA_SIZE) {
+		if (inline_size > EXT4_MIN_INLINE_DATA_SIZE &&
+		    EXT4_INODE_HAS_XATTR_SPACE(inode)) {
 			if ((err = ext4_xattr_ibody_find(inode, &i, &is)) != 0)
 				goto out_error;
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ