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] [day] [month] [year] [list]
Message-ID: <67376704.050a0220.3bcb1c.0000.GAE@google.com>
Date: Fri, 15 Nov 2024 07:21:40 -0800
From: syzbot <syzbot+549710bad9c798e25b15@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] Re: KMSAN: uninit-value in __crc32c_le_base

For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com.

***

Subject: Re: KMSAN: uninit-value in __crc32c_le_base
Author: dmantipov@...dex.ru

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

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b11bfe68dd65..e0b515aa1c63 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -18,6 +18,9 @@
 #include <linux/crc32c.h>
 #include <linux/sched/mm.h>
 #include <linux/unaligned.h>
+#ifdef CONFIG_KMSAN
+#include <linux/kmsan-checks.h>
+#endif
 #include <crypto/hash.h>
 #include "ctree.h"
 #include "disk-io.h"
@@ -93,6 +96,10 @@ static void csum_tree_block(struct extent_buffer *buf, u8 *result)
 		num_pages = num_extent_pages(buf);
 	}
 
+#ifdef CONFIG_KMSAN
+	kmsan_unpoison_memory(kaddr + BTRFS_CSUM_SIZE,
+			      first_page_part - BTRFS_CSUM_SIZE);
+#endif
 	crypto_shash_update(shash, kaddr + BTRFS_CSUM_SIZE,
 			    first_page_part - BTRFS_CSUM_SIZE);
 
@@ -104,6 +111,9 @@ static void csum_tree_block(struct extent_buffer *buf, u8 *result)
 	 */
 	for (i = 1; i < num_pages && INLINE_EXTENT_BUFFER_PAGES > 1; i++) {
 		kaddr = folio_address(buf->folios[i]);
+#ifdef CONFIG_KMSAN
+		kmsan_unpoison_memory(kaddr, PAGE_SIZE);
+#endif
 		crypto_shash_update(shash, kaddr, PAGE_SIZE);
 	}
 	memset(result, 0, BTRFS_CSUM_SIZE);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ